1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

TurnTimerInfo

This commit is contained in:
nordsoft
2023-08-14 02:16:25 +04:00
parent f01973a4f0
commit 3c9c302fd2
17 changed files with 93 additions and 31 deletions

View File

@@ -77,11 +77,11 @@ void TurnTimerWidget::tick(uint32_t msPassed)
auto player = LOCPLINT->cb->getCurrentPlayer();
auto time = LOCPLINT->cb->getPlayerTurnTime(player);
cachedTurnTime -= msPassed;
if(time / 1000 != lastTurnTime / 1000)
if(time.turnTimer / 1000 != lastTurnTime / 1000)
{
//do not update timer on this tick
lastTurnTime = time;
cachedTurnTime = time;
lastTurnTime = time.turnTimer;
cachedTurnTime = time.turnTimer;
}
else setTime(cachedTurnTime);
}