Team switch on half rounds

This commit is contained in:
Rendo 2025-12-07 15:41:25 +05:00
commit 72bfd798da
2 changed files with 47 additions and 0 deletions

View file

@ -141,12 +141,15 @@ func end_round(win_team: int) -> void:
if multiplayer.is_server():
get_tree().create_timer(5).timeout.connect(start_round)
end_round.rpc(win_team)
if current_round == Lobby.half_rounds:
Lobby.swap_teams()
if win_team == TEAMS.DEFENCE:
defender_score += 1
elif win_team == TEAMS.ATTACK:
attacker_score += 1
round_state = ROUND_STATES.AFTER_ROUND
round_state_changed.emit(round_state)