From ef8f6310745a434317ba0f17875e1cb7db59e5a9 Mon Sep 17 00:00:00 2001 From: Skipper Date: Thu, 13 Feb 2025 22:14:31 +0000 Subject: Updated Aircraft.py Updated to do the prev_life/life swap in the aircraft add_state function. --- lib/Aircraft.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/Aircraft.py b/lib/Aircraft.py index dd2bbed..5e6e24d 100644 --- a/lib/Aircraft.py +++ b/lib/Aircraft.py @@ -76,7 +76,11 @@ class Aircraft: if packet.player_id != self.id: return None + if self.life == -1: + self.life=packet.life + self.prev_life = self.life + self.life = packet.life self.set_position(packet.position) self.set_attitude(packet.atti) -- cgit v1.2.3