Rename usages of collidable to physics (#2230)

* Rename usages of collidable to physics

* high tier PANIQUE

* aaaaaaaaAAAAAa

* cursed commit dont research

* Fix urist and items being anchored

* Fix the rest
This commit is contained in:
DrSmugleaf
2020-10-11 16:36:58 +02:00
committed by GitHub
parent 413ca9812d
commit b64cb24059
79 changed files with 292 additions and 268 deletions

View File

@@ -20,9 +20,9 @@ namespace Content.Client.GameObjects.Components.Mobs.State
EntitySystem.Get<StandingStateSystem>().Down(entity);
if (entity.TryGetComponent(out CollidableComponent collidable))
if (entity.TryGetComponent(out PhysicsComponent physics))
{
collidable.CanCollide = false;
physics.CanCollide = false;
}
}
@@ -30,9 +30,9 @@ namespace Content.Client.GameObjects.Components.Mobs.State
{
EntitySystem.Get<StandingStateSystem>().Standing(entity);
if (entity.TryGetComponent(out CollidableComponent collidable))
if (entity.TryGetComponent(out PhysicsComponent physics))
{
collidable.CanCollide = true;
physics.CanCollide = true;
}
}

View File

@@ -73,7 +73,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
return;
}
if (!ally.TryGetComponent(out ICollidableComponent collidable))
if (!ally.TryGetComponent(out IPhysicsComponent physics))
{
return;
}
@@ -85,7 +85,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
}
// all entities have a TransformComponent
var transform = collidable.Entity.Transform;
var transform = physics.Entity.Transform;
// if not on the same map, continue
if (transform.MapID != _eyeManager.CurrentMap || !transform.IsMapTransform)
@@ -93,7 +93,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
continue;
}
var worldBox = collidable.WorldAABB;
var worldBox = physics.WorldAABB;
// if not on screen, or too small, continue
if (!worldBox.Intersects(in viewport) || worldBox.IsEmpty())
@@ -101,7 +101,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
continue;
}
var screenCoordinates = _eyeManager.WorldToScreen(collidable.WorldAABB.TopLeft + (0, 0.5f));
var screenCoordinates = _eyeManager.WorldToScreen(physics.WorldAABB.TopLeft + (0, 0.5f));
DrawString(screen, _font, screenCoordinates, _traitorText, Color.OrangeRed);
}
}