1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Hold timer client counter

This commit is contained in:
nordsoft
2023-08-28 05:06:43 +04:00
parent 21af69e0b7
commit b5417c667c
3 changed files with 14 additions and 2 deletions

View File

@@ -114,7 +114,8 @@ void TurnTimerWidget::tick(uint32_t msPassed)
continue;
auto time = LOCPLINT->cb->getPlayerTurnTime(player);
cachedTurnTime -= msPassed;
if(LOCPLINT->isTimerEnabled())
cachedTurnTime -= msPassed;
if(cachedTurnTime < 0) cachedTurnTime = 0; //do not go below zero
if(lastPlayer != player)