diff --git a/Content.Server/Physics/Controllers/MoverController.cs b/Content.Server/Physics/Controllers/MoverController.cs index f927e717a9d868..d0605e916e72a6 100644 --- a/Content.Server/Physics/Controllers/MoverController.cs +++ b/Content.Server/Physics/Controllers/MoverController.cs @@ -314,6 +314,9 @@ private void HandleShuttleMovement(float frameTime) var linearInput = Vector2.Zero; var brakeInput = 0f; var angularInput = 0f; + var linearCount = 0; + var brakeCount = 0; + var angularCount = 0; foreach (var (pilotUid, pilot, _, consoleXform) in pilots) { @@ -322,24 +325,27 @@ private void HandleShuttleMovement(float frameTime) if (brakes > 0f) { brakeInput += brakes; + brakeCount++; } if (strafe.Length() > 0f) { var offsetRotation = consoleXform.LocalRotation; linearInput += offsetRotation.RotateVec(strafe); + linearCount++; } if (rotation != 0f) { angularInput += rotation; + angularCount++; } } - var count = pilots.Count; - linearInput /= count; - angularInput /= count; - brakeInput /= count; + // Don't slow down the shuttle if there's someone just looking at the console + linearInput /= Math.Max(1, linearCount); + angularInput /= Math.Max(1, angularCount); + brakeInput /= Math.Max(1, brakeCount); // Handle shuttle movement if (brakeInput > 0f)