@@ -99,7 +99,9 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:
9999 load_player_config (abs_config_path , team , name , loadout_file )
100100 )
101101 case "psyonix" :
102- abs_config_path = (config_path .parent / car_config ).resolve ()
102+ abs_config_path = (
103+ (config_path .parent / car_config ).resolve () if car_config else None
104+ )
103105 players .append (
104106 load_psyonix_config (
105107 team ,
@@ -153,6 +155,17 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:
153155 audio = __enum (mutator_table , "audio" , flat .AudioMutator ),
154156 )
155157
158+ try :
159+ enable_rendering = (
160+ flat .DebugRendering .OnByDefault
161+ if __bool (match_table , "enable_rendering" )
162+ else flat .DebugRendering .OffByDefault
163+ )
164+ except ConfigParsingException :
165+ enable_rendering = __enum (
166+ match_table , "enable_rendering" , flat .DebugRendering .AlwaysOff
167+ )
168+
156169 return flat .MatchConfiguration (
157170 launcher = __enum (rlbot_table , "launcher" , flat .Launcher ),
158171 launcher_arg = __str (rlbot_table , "launcher_arg" ),
@@ -168,9 +181,7 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:
168181 existing_match_behavior = __enum (
169182 match_table , "existing_match_behavior" , flat .ExistingMatchBehavior
170183 ),
171- enable_rendering = __enum (
172- match_table , "enable_rendering" , flat .DebugRendering .OffByDefault
173- ),
184+ enable_rendering = enable_rendering ,
174185 enable_state_setting = __bool (match_table , "enable_state_setting" ),
175186 freeplay = __bool (match_table , "freeplay" ),
176187 )
0 commit comments