fix(multiplayer): honor assigned team and slot

This commit is contained in:
Josh Creek
2026-09-01 16:17:10 +01:00
parent 5812386676
commit 69a8402f11
4 changed files with 72 additions and 5 deletions
+3 -2
View File
@@ -455,8 +455,9 @@ func _start_server() -> void:
sorted_peer_ids.sort()
for peer_id in sorted_peer_ids:
var info: MatchNet.PlayerInfo = MatchNet.roster[peer_id]
var spawn_index: int = team_counts.get(info.team, 0)
team_counts[info.team] = spawn_index + 1
var spawn_index: int = info.spawn_index if info.spawn_index >= 0 else team_counts.get(info.team, 0)
if info.spawn_index < 0:
team_counts[info.team] = spawn_index + 1
var slot := SlotInfo.new()
slot.peer_id = peer_id
slot.team = info.team