From e04dd4c3b9b6d7109eb23fa702dba645171ecafb Mon Sep 17 00:00:00 2001 From: Kill_Me_I_Noobs <118206719+Vonsant@users.noreply.github.com> Date: Sat, 4 May 2024 05:40:17 +0300 Subject: [PATCH] Update ThrusterSystem.cs --- Content.Server/Shuttles/Systems/ThrusterSystem.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Shuttles/Systems/ThrusterSystem.cs b/Content.Server/Shuttles/Systems/ThrusterSystem.cs index 9fca07b0d13..dee66875bc0 100644 --- a/Content.Server/Shuttles/Systems/ThrusterSystem.cs +++ b/Content.Server/Shuttles/Systems/ThrusterSystem.cs @@ -323,7 +323,7 @@ public void EnableThruster(EntityUid uid, ThrusterComponent component, Transform shape.Set(component.BurnPoly); _fixtureSystem.TryCreateFixture(uid, shape, BurnFixture, hard: false, collisionLayer: (int) CollisionGroup.FullTileMask, body: physicsComponent); } - RefreshCenter(uid, shuttleComponent, IndexToDirectionFlag(direction)); + RefreshCenter(uid, shuttleComponent, IndexToDirectionFlag(direction), changedDirection); break; case ThrusterType.Angular: shuttleComponent.AngularThrust += component.Thrust; @@ -351,10 +351,10 @@ public void EnableThruster(EntityUid uid, ThrusterComponent component, Transform /// /// Refreshes the center of thrust for movement calculations. /// - private void RefreshCenter(EntityUid uid, ShuttleComponent shuttle, DirectionFlag changedDirection) + private void RefreshCenter(EntityUid uid, ShuttleComponent shuttle, DirectionFlag changedDirection, DirectionFlag? originalChangedDirection = null) { var center = Vector2.Zero; - var thrustQuery = GetEntityQuery(); + var thrustQuery = GetEntityQuery(); var xformQuery = GetEntityQuery(); var index = GetFlagIndex(changedDirection); @@ -413,7 +413,7 @@ public void DisableThruster(EntityUid uid, ThrusterComponent component, EntityUi shuttleComponent.BaseLinearThrust[direction] -= component.BaseThrust; DebugTools.Assert(shuttleComponent.LinearThrusters[direction].Contains(uid)); shuttleComponent.LinearThrusters[direction].Remove(uid); - RefreshCenter(uid, shuttleComponent, IndexToDirectionFlag(direction)); + RefreshCenter(uid, shuttleComponent, IndexToDirectionFlag(direction), changedDirection); break; case ThrusterType.Angular: shuttleComponent.AngularThrust -= component.Thrust;