Fix even more warnings (#11968)
Also more instances of someone using TryComp instead of HasComp Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Content.Shared.Spawning
|
||||
in Box2? box = null,
|
||||
SharedPhysicsSystem? physicsManager = null)
|
||||
{
|
||||
physicsManager ??= EntitySystem.Get<SharedPhysicsSystem>();
|
||||
physicsManager ??= entityManager.System<SharedPhysicsSystem>();
|
||||
var mapCoordinates = coordinates.ToMap(entityManager);
|
||||
|
||||
return entityManager.SpawnIfUnobstructed(prototypeName, mapCoordinates, collisionLayer, box, physicsManager);
|
||||
@@ -30,7 +30,7 @@ namespace Content.Shared.Spawning
|
||||
SharedPhysicsSystem? collision = null)
|
||||
{
|
||||
var boxOrDefault = box.GetValueOrDefault(Box2.UnitCentered).Translated(coordinates.Position);
|
||||
collision ??= EntitySystem.Get<SharedPhysicsSystem>();
|
||||
collision ??= entityManager.System<SharedPhysicsSystem>();
|
||||
|
||||
foreach (var body in collision.GetCollidingEntities(coordinates.MapId, in boxOrDefault))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user