Skip to content

Commit

Permalink
Fixes attaching to a scenario.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsharf committed Jun 9, 2023
1 parent fc5ec6f commit 3b36487
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions server/scenario_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def create_actor(self, role):

if role == Role.SPECTATOR:
self._scenario_messages[created_id] = []
self._state._self_initialize() # pylint: disable=protected-access
return created_id

actor = self._state._actors[created_id] # pylint: disable=protected-access
Expand Down Expand Up @@ -208,12 +209,7 @@ def has_pending_messages(self):
def fill_messages(
self, player_id, out_messages: List[message_from_server.MessageFromServer]
) -> bool:
"""Serializes all messages to one player into a linear history.
If any messages have been generated this iteration, caps those
messages with a StateMachineTick. This lets us separate logic
iterations on the receive side.
"""
"""Serializes all messages to one player into a linear history."""
message = self._next_message(player_id)
messages_added = 0
while message != None:
Expand Down

0 comments on commit 3b36487

Please sign in to comment.