mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
retain arrows when phases change
This commit is contained in:
parent
62c02e3fce
commit
d8a2f2db21
1 changed files with 0 additions and 15 deletions
|
|
@ -652,22 +652,7 @@ void Server_Game::setActivePlayer(int _activePlayer)
|
||||||
void Server_Game::setActivePhase(int _activePhase)
|
void Server_Game::setActivePhase(int _activePhase)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&gameMutex);
|
QMutexLocker locker(&gameMutex);
|
||||||
|
|
||||||
for (Server_Player *player : players.values()) {
|
|
||||||
QList<Server_Arrow *> toDelete = player->getArrows().values();
|
|
||||||
for (int i = 0; i < toDelete.size(); ++i) {
|
|
||||||
Server_Arrow *a = toDelete[i];
|
|
||||||
|
|
||||||
Event_DeleteArrow event;
|
|
||||||
event.set_arrow_id(a->getId());
|
|
||||||
sendGameEventContainer(prepareGameEvent(event, player->getPlayerId()));
|
|
||||||
|
|
||||||
player->deleteArrow(a->getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
activePhase = _activePhase;
|
activePhase = _activePhase;
|
||||||
|
|
||||||
Event_SetActivePhase event;
|
Event_SetActivePhase event;
|
||||||
event.set_phase(activePhase);
|
event.set_phase(activePhase);
|
||||||
sendGameEventContainer(prepareGameEvent(event, -1));
|
sendGameEventContainer(prepareGameEvent(event, -1));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue