File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ class MatchManager:
105105 packet : Optional [flat .GameTickPacket ] = None
106106 rlbot_server_process : Optional [psutil .Process ] = None
107107 rlbot_server_port = RLBOT_SERVER_PORT
108+ initialized = False
108109
109110 def __init__ (
110111 self ,
@@ -161,7 +162,10 @@ def start_match(
161162 ):
162163 self .logger .info ("Python attempting to start match." )
163164 self .rlbot_interface .start_match (match_config , self .rlbot_server_port )
164- self .rlbot_interface .send_init_complete (flat .InitComplete ())
165+
166+ if not self .initialized :
167+ self .rlbot_interface .send_init_complete (flat .InitComplete ())
168+ self .initialized = True
165169
166170 if wait_for_start :
167171 self .wait_for_valid_packet ()
Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ def _initialize_agent(self):
5454 self .initialize_agent ()
5555 except Exception as e :
5656 self .logger .critical (
57- "Script %s failed to initialize due the following error: %s" , self .name , e
57+ "Script %s failed to initialize due the following error: %s" ,
58+ self .name ,
59+ e ,
5860 )
5961 print_exc ()
6062 exit ()
Original file line number Diff line number Diff line change 1- from time import sleep
21import numpy as np
32import torch
43from agent import Agent
You can’t perform that action at this time.
0 commit comments