From 570944cb774743885bd726db97687d42cc80cd00 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 26 Jan 2024 23:00:05 -0800 Subject: [PATCH] Minor fix --- crates/system/src/phys/objects/ship/ship.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/system/src/phys/objects/ship/ship.rs b/crates/system/src/phys/objects/ship/ship.rs index 8f322ba..e6a47d8 100644 --- a/crates/system/src/phys/objects/ship/ship.rs +++ b/crates/system/src/phys/objects/ship/ship.rs @@ -130,6 +130,9 @@ impl PhysShip { } }; } + // Update this now and not later, + // since autopilot might change controls. + self.last_controls = self.controls.clone(); match self.data.get_state() { ShipState::Collapsing { .. } => { @@ -378,8 +381,6 @@ impl PhysShip { self.is_destroyed = true; } }; - - self.last_controls = self.controls.clone(); } /// Should this ship's data be removed?