mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 17:15:09 -07:00
In resetChatAndPhase() (the rewound() handler), also clear all spectators from both PlayerManager and PlayerListWidget before the replay rebuilds from event 0. The forward replay then re-adds exactly the spectators whose join events fall within the new time range via eventGameStateChanged/eventJoin.
This commit is contained in:
parent
44909f3d6c
commit
eaf8351426
5 changed files with 27 additions and 0 deletions
|
|
@ -266,6 +266,10 @@ void TabGame::resetChatAndPhase()
|
|||
|
||||
// reset phase markers
|
||||
game->getGameState()->setCurrentPhase(-1);
|
||||
|
||||
// reset spectator state so the replay can rebuild it from the start
|
||||
game->getPlayerManager()->clearSpectators();
|
||||
playerListWidget->clearSpectators();
|
||||
}
|
||||
|
||||
void TabGame::emitUserEvent()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue