Remove component.Paused (#6285)

This commit is contained in:
metalgearsloth
2022-01-26 17:57:48 +11:00
committed by GitHub
parent b2229a951d
commit 3f7f3baa16
6 changed files with 15 additions and 9 deletions

View File

@@ -106,7 +106,7 @@ namespace Content.Server.Physics.Controllers
// then do the movement input once for it.
foreach (var (shuttle, pilots) in _shuttlePilots)
{
if (shuttle.Paused || !EntityManager.TryGetComponent((shuttle).Owner, out PhysicsComponent? body)) continue;
if (Paused(shuttle.Owner) || !TryComp(shuttle.Owner, out PhysicsComponent? body)) continue;
// Collate movement linear and angular inputs together
var linearInput = Vector2.Zero;
@@ -129,7 +129,7 @@ namespace Content.Server.Physics.Controllers
if (sprint.Equals(Vector2.Zero)) continue;
var offsetRotation = EntityManager.GetComponent<TransformComponent>((console).Owner).LocalRotation;
var offsetRotation = EntityManager.GetComponent<TransformComponent>(console.Owner).LocalRotation;
linearInput += offsetRotation.RotateVec(new Vector2(0f, sprint.Y));
angularInput += sprint.X;