From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Tue, 23 Jan 2024 12:49:19 +0000 (+1100)
Subject: Fix thrusters (#24446)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9e0bdcd8d8db4671ac4ae9ef85095fff498ebe3b;p=space-station-14.git
Fix thrusters (#24446)
---
diff --git a/Content.Server/Physics/Controllers/MoverController.cs b/Content.Server/Physics/Controllers/MoverController.cs
index 41ca868508..c362507f19 100644
--- a/Content.Server/Physics/Controllers/MoverController.cs
+++ b/Content.Server/Physics/Controllers/MoverController.cs
@@ -249,8 +249,8 @@ namespace Content.Server.Physics.Controllers
var horizIndex = vel.X > 0 ? 1 : 3; // east else west
var vertIndex = vel.Y > 0 ? 2 : 0; // north else south
- var horizComp = vel.X != 0 ? MathF.Pow(Vector2.Dot(vel, new (shuttle.BaseLinearThrust[horizIndex] / shuttle.LinearThrust[horizIndex], 0f)), 2) : 0;
- var vertComp = vel.Y != 0 ? MathF.Pow(Vector2.Dot(vel, new (0f, shuttle.BaseLinearThrust[vertIndex] / shuttle.LinearThrust[vertIndex])), 2) : 0;
+ var horizComp = vel.X != 0 ? MathF.Pow(Vector2.Dot(vel, new (shuttle.LinearThrust[horizIndex] / shuttle.LinearThrust[horizIndex], 0f)), 2) : 0;
+ var vertComp = vel.Y != 0 ? MathF.Pow(Vector2.Dot(vel, new (0f, shuttle.LinearThrust[vertIndex] / shuttle.LinearThrust[vertIndex])), 2) : 0;
return shuttle.BaseMaxLinearVelocity * vel * MathF.ReciprocalSqrtEstimate(horizComp + vertComp);
}
diff --git a/Content.Server/Shuttles/Components/ShuttleComponent.cs b/Content.Server/Shuttles/Components/ShuttleComponent.cs
index 488f1d3a21..949d8ea5bb 100644
--- a/Content.Server/Shuttles/Components/ShuttleComponent.cs
+++ b/Content.Server/Shuttles/Components/ShuttleComponent.cs
@@ -30,12 +30,6 @@ namespace Content.Server.Shuttles.Components
[ViewVariables]
public readonly float[] LinearThrust = new float[4];
- ///
- /// The cached thrust available for each cardinal direction, if all thrusters are T1
- ///
- [ViewVariables]
- public readonly float[] BaseLinearThrust = new float[4];
-
///
/// The thrusters contributing to each direction for impulse.
///