From dbc52a5e0337cfe8a040ac77117b788b49ef46db Mon Sep 17 00:00:00 2001 From: Ritabrata Das Date: Thu, 20 Feb 2025 14:48:31 +0530 Subject: Add being same IFF to refueling --- lib/PacketManager/packets/FSNETCMD_JOINREQUEST.py | 4 ++-- lib/Player.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/PacketManager/packets/FSNETCMD_JOINREQUEST.py b/lib/PacketManager/packets/FSNETCMD_JOINREQUEST.py index 7796599..f24c94a 100644 --- a/lib/PacketManager/packets/FSNETCMD_JOINREQUEST.py +++ b/lib/PacketManager/packets/FSNETCMD_JOINREQUEST.py @@ -7,7 +7,7 @@ class FSNETCMD_JOINREQUEST: #8 """ def __init__(self, buffer:bytes, should_decode:bool=True): self.buffer = buffer - self.iff = None + self.iff = 0 # The IFF sent is 1 subtracted from the selected value by the player self.aircraft = None self.start_pos = None #It's the STP name self.fuel = None @@ -26,4 +26,4 @@ class FSNETCMD_JOINREQUEST: #8 start_pos.encode(), 1, fuel, smoke) if with_size: return pack("I",len(buffer))+buffer - return buffer \ No newline at end of file + return buffer diff --git a/lib/Player.py b/lib/Player.py index 7f54914..1d39a56 100644 --- a/lib/Player.py +++ b/lib/Player.py @@ -12,6 +12,7 @@ class Player: self.ip = "" self.streamWriterObject = streamWriterObject self.is_a_bot = True # We check if they are still present after LOGIN packet, then they're not a bot + self.iff = 0 def set_aircraft(self, aircraft:Aircraft): self.aircraft = aircraft -- cgit v1.2.3