Skip to content

Commit e1e67de

Browse files
Fix PlayerConfig overrides
1 parent 09007da commit e1e67de

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rlbot/config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,18 @@ def load_player_config(
178178

179179
run_command = settings.get("run_command", "")
180180
if CURRENT_OS == OS.LINUX and "run_command_linux" in settings:
181-
run_command = settings["run_command_linux"]
181+
run_command = settings.get("run_command_linux", "")
182182

183-
loadout_path = path.parent / Path(settings["loadout_file"]) if "loadout_file" in settings else loadout_override
183+
loadout_path = path.parent / Path(settings["loadout_file"]) if "loadout_file" in settings else None
184+
loadout_path = loadout_override or loadout_path
184185
loadout = load_player_loadout(loadout_path, team) if loadout_path is not None else None
185186

186187
return flat.PlayerConfiguration(
187188
type,
188-
settings.get("name", name_override or "Unnamed"),
189+
name_override or settings.get("name"),
189190
team,
190191
str(root_dir),
191-
str(run_command),
192+
run_command,
192193
loadout,
193194
0,
194195
settings.get("agent_id", ""),

0 commit comments

Comments
 (0)