From 4c866345e5db2416e9c6f5064a51a4a763e29b8d Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Wed, 26 Apr 2023 16:08:16 -0700 Subject: [PATCH] copy paste #590 fix for model ship --- QSB/ModelShip/ModelShipThrusterVariableSyncer.cs | 11 +++++++++++ QSB/ShipSync/ShipThrusterVariableSyncer.cs | 1 + 2 files changed, 12 insertions(+) diff --git a/QSB/ModelShip/ModelShipThrusterVariableSyncer.cs b/QSB/ModelShip/ModelShipThrusterVariableSyncer.cs index 3e896587..f1ed0c8e 100644 --- a/QSB/ModelShip/ModelShipThrusterVariableSyncer.cs +++ b/QSB/ModelShip/ModelShipThrusterVariableSyncer.cs @@ -23,6 +23,17 @@ public class ModelShipThrusterVariableSyncer : MonoBehaviour public void Update() { + // fixes #590 + if (ModelShipManager.Instance.CurrentFlyer == uint.MaxValue) + { + if (ThrusterModel) + { + AccelerationSyncer.Value = Vector3.zero; + } + + return; + } + if (PlayerTransformSync.LocalInstance && QSBPlayerManager.LocalPlayer.FlyingModelShip) { GetFromShip(); diff --git a/QSB/ShipSync/ShipThrusterVariableSyncer.cs b/QSB/ShipSync/ShipThrusterVariableSyncer.cs index 40ede599..85983763 100644 --- a/QSB/ShipSync/ShipThrusterVariableSyncer.cs +++ b/QSB/ShipSync/ShipThrusterVariableSyncer.cs @@ -22,6 +22,7 @@ public class ShipThrusterVariableSyncer : NetworkBehaviour public void Update() { // bug : this doesn't account for autopilot + // fixes #590 if (ShipManager.Instance.CurrentFlyer == uint.MaxValue) { if (_thrusterModel)