fix(server): use headless-safe arena simulation

This commit is contained in:
Josh Creek
2026-08-21 19:26:47 +01:00
parent 9e4609d5b3
commit dab647e514
2 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -435,7 +435,11 @@ func _start_server() -> void:
var arena_path := server_arena_override if not server_arena_override.is_empty() else ArenaRegistry.random_path()
server_arena_override = ""
_arena_path = arena_path
arena = (load(arena_path) as PackedScene).instantiate()
# The authoritative simulation needs the shared goals, boundary, and spawn
# markers, not a renderable arena variant. Some imported decoration scenes
# cannot be instantiated by a dedicated export; clients still receive
# arena_path below and instantiate that variant for presentation.
arena = (load(ScenePaths.SERVER_ARENA) as PackedScene).instantiate()
add_child(arena)
for goal in arena.get_goals():
goal.goal_scored.connect(_handle_goal_scored)
+4
View File
@@ -9,3 +9,7 @@ const LOBBY := "res://scenes/lobby.tscn"
# previously only ever reached by test harnesses hardcoding the string.
const NETWORKED_MATCH := "res://scenes/networked_match.tscn"
const SERVER_BOOT := "res://scenes/server_boot.tscn"
# Arena variants add presentation-only scenery. The dedicated server uses the
# common physical layout instead, while MatchSim still tells clients which
# variant to render.
const SERVER_ARENA := "res://scenes/arena_base.tscn"