Fix rematch command for spectators
This commit is contained in:
parent
28ba643bf9
commit
9b8b1767eb
1 changed files with 5 additions and 0 deletions
|
@ -1082,6 +1082,7 @@ COMMANDS:
|
|||
newGame.Player2 = clientGame.Player2
|
||||
newGame.allowed1 = clientGame.allowed1
|
||||
newGame.allowed2 = clientGame.allowed2
|
||||
copy(newGame.spectators, clientGame.spectators)
|
||||
s.games = append(s.games, newGame)
|
||||
|
||||
clientGame.client1 = nil
|
||||
|
@ -1120,6 +1121,10 @@ COMMANDS:
|
|||
newGame.client2.sendEvent(ev2)
|
||||
newGame.sendBoard(newGame.client2)
|
||||
}
|
||||
|
||||
for _, spectator := range newGame.spectators {
|
||||
newGame.sendBoard(spectator)
|
||||
}
|
||||
} else {
|
||||
clientGame.rematch = cmd.client.playerNumber
|
||||
|
||||
|
|
Loading…
Reference in a new issue