ADD player state tracking

This commit is contained in:
2025-04-26 20:05:26 +02:00
parent 43c23d8e60
commit e6e1985a4f
8 changed files with 66 additions and 13 deletions

View File

@@ -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:

View File

@@ -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