1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #3013 from Nordsoft91/turn-timer

This commit is contained in:
Nordsoft91 2023-10-08 12:11:44 +02:00 committed by GitHub
commit 088ce9b948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -300,7 +300,7 @@ void CServerHandler::applyPacksOnLobbyScreen()
CPackForLobby * pack = packsForLobbyScreen.front();
packsForLobbyScreen.pop_front();
CBaseForLobbyApply * apply = applier->getApplier(typeList.getTypeID(pack)); //find the applier
apply->applyOnLobbyScreen(static_cast<CLobbyScreen *>(SEL), this, pack);
apply->applyOnLobbyScreen(dynamic_cast<CLobbyScreen *>(SEL), this, pack);
GH.windows().totalRedraw();
delete pack;
}

View File

@ -150,10 +150,18 @@ void TurnTimerWidget::tick(uint32_t msPassed)
}
else
{
for(PlayerColor p(0); p < PlayerColor::PLAYER_LIMIT; ++p)
if(LOCPLINT->makingTurn)
updateTimer(LOCPLINT->playerID, msPassed);
else
{
if(LOCPLINT->cb->isPlayerMakingTurn(p))
updateTimer(p, msPassed);
for(PlayerColor p(0); p < PlayerColor::PLAYER_LIMIT; ++p)
{
if(LOCPLINT->cb->isPlayerMakingTurn(p))
{
updateTimer(p, msPassed);
break;
}
}
}
}
}