diff --git a/sc2/main.py b/sc2/main.py index 5e1b3621..78118b6d 100644 --- a/sc2/main.py +++ b/sc2/main.py @@ -233,7 +233,7 @@ async def _play_game( return result -async def _play_replay(client, ai, realtime=False, player_id=0): +async def _play_replay(client, ai, realtime=False, player_id=1): ai._initialize_variables() game_data = await client.get_game_data() @@ -455,7 +455,7 @@ async def _setup_replay(server, replay_path, realtime, observed_id): async def _host_replay(replay_path, ai, realtime, _portconfig, base_build, data_version, observed_id): async with SC2Process(fullscreen=False, base_build=base_build, data_hash=data_version) as server: client = await _setup_replay(server, replay_path, realtime, observed_id) - result = await _play_replay(client, ai, realtime) + result = await _play_replay(client, ai, realtime, observed_id) return result @@ -498,7 +498,7 @@ async def run_host_and_join(): return result -def run_replay(ai, replay_path, realtime=False, observed_id=0): +def run_replay(ai, replay_path, realtime=False, observed_id=1): portconfig = Portconfig() assert os.path.isfile(replay_path), f"Replay does not exist at the given path: {replay_path}" assert os.path.isabs( diff --git a/sc2/observer_ai.py b/sc2/observer_ai.py index 1f049039..d0fd8946 100644 --- a/sc2/observer_ai.py +++ b/sc2/observer_ai.py @@ -36,17 +36,14 @@ def time_formatted(self) -> str: t = self.time return f"{int(t // 60):02}:{int(t % 60):02}" - @property def game_info(self) -> GameInfo: """ See game_info.py """ return self._game_info - @property def game_data(self) -> GameData: """ See game_data.py """ return self._game_data - @property def client(self) -> Client: """ See client.py """ return self._client