ADD player state tracking
This commit is contained in:
@@ -37,6 +37,7 @@ class Match:
|
||||
player.dead = self.current_tick[self.current_tick["player_steamid"] == player.steam_id]["is_alive"].values[0] == 0
|
||||
player.is_shooting = self.current_tick[self.current_tick["player_steamid"] == player.steam_id]["shots_fired"].values[0]
|
||||
player.health = int(self.current_tick[self.current_tick["player_steamid"] == player.steam_id]["health"].values[0])
|
||||
player.current_weapon = self.current_tick[self.current_tick["player_steamid"] == player.steam_id]["active_weapon_name"].values[0]
|
||||
|
||||
def _update_round(self) -> None:
|
||||
if self.current_tick.empty:
|
||||
|
||||
@@ -11,6 +11,7 @@ class Player:
|
||||
self.health = 100
|
||||
self.dead = False
|
||||
self.is_shooting = False
|
||||
self.current_weapon = None
|
||||
|
||||
## UI-related state
|
||||
self.is_selected = False
|
||||
|
||||
Reference in New Issue
Block a user