Skip to content

Commit

Permalink
Fix scripts and hiveminds
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed Oct 19, 2024
1 parent 2b329b4 commit 036318b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
6 changes: 4 additions & 2 deletions rlbot/managers/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, default_agent_id: Optional[str] = None):
self._handle_ball_prediction
)
self._game_interface.controllable_team_info_handlers.append(
self._handle_player_mappings
self._handle_controllable_team_info
)
self._game_interface.packet_handlers.append(self._handle_packet)

Expand Down Expand Up @@ -97,7 +97,9 @@ def _handle_field_info(self, field_info: flat.FieldInfo):
):
self._initialize()

def _handle_player_mappings(self, player_mappings: flat.ControllableTeamInfo):
def _handle_controllable_team_info(
self, player_mappings: flat.ControllableTeamInfo
):
self.team = player_mappings.team
controllable = player_mappings.controllables[0]
self.spawn_id = controllable.spawn_id
Expand Down
7 changes: 6 additions & 1 deletion rlbot/managers/hivemind.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def __init__(self, default_agent_id: Optional[str] = None):
self._game_interface.ball_prediction_handlers.append(
self._handle_ball_prediction
)
self._game_interface.controllable_team_info_handlers.append(
self._handle_controllable_team_info
)
self._game_interface.packet_handlers.append(self._handle_packet)

self.renderer = Renderer(self._game_interface)
Expand Down Expand Up @@ -97,7 +100,9 @@ def _handle_field_info(self, field_info: flat.FieldInfo):
):
self._initialize()

def _handle_player_mappings(self, player_mappings: flat.ControllableTeamInfo):
def _handle_controllable_team_info(
self, player_mappings: flat.ControllableTeamInfo
):
self.team = player_mappings.team
for controllable in player_mappings.controllables:
self.spawn_ids.append(controllable.spawn_id)
Expand Down
7 changes: 6 additions & 1 deletion rlbot/managers/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def __init__(self, default_agent_id: Optional[str] = None):
self._game_interface.ball_prediction_handlers.append(
self._handle_ball_prediction
)
self._game_interface.controllable_team_info_handlers.append(
self._handle_controllable_team_info
)
self._game_interface.packet_handlers.append(self._handle_packet)

self.renderer = Renderer(self._game_interface)
Expand Down Expand Up @@ -91,7 +94,9 @@ def _handle_field_info(self, field_info: flat.FieldInfo):
):
self._initialize()

def _handle_player_mappings(self, player_mappings: flat.ControllableTeamInfo):
def _handle_controllable_team_info(
self, player_mappings: flat.ControllableTeamInfo
):
self.team = player_mappings.team
controllable = player_mappings.controllables[0]
self.spawn_id = controllable.spawn_id
Expand Down
5 changes: 4 additions & 1 deletion rlbot/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "5.0.0-beta.9"
__version__ = "5.0.0-beta.10"


RESET_SEQ = "\033[0m"
Expand All @@ -15,6 +15,9 @@ def _get_color(color: int) -> str:
)

RELEASE_NOTES = {
"5.0.0-beta.10": """
Fix bug in hivemind & script start
""",
"5.0.0-beta.9": """
Rename the `initialize_agent` method to `initialize`
Update to new sockets spec
Expand Down
1 change: 0 additions & 1 deletion tests/hivemind.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[rlbot]
launcher = "steam"
auto_start_bots = true

[match]
game_mode = "Soccer"
Expand Down

0 comments on commit 036318b

Please sign in to comment.