mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
fix(multiplayer): honor assigned team and slot
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user