1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Timer works as designed

This commit is contained in:
nordsoft 2023-08-30 03:44:09 +04:00
parent cc3ca9a41e
commit 00216168bf
2 changed files with 4 additions and 4 deletions

View File

@ -1178,11 +1178,10 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, ui8 teleporting, boo
for(auto topQuery = queries->topQuery(h->tempOwner); true; topQuery = queries->topQuery(h->tempOwner))
{
moveQuery = std::dynamic_pointer_cast<CHeroMovementQuery>(topQuery);
if(moveQuery
&& (!transit || result != TryMoveHero::SUCCESS))
queries->popIfTop(moveQuery);
else
if(!moveQuery || (transit && result == TryMoveHero::SUCCESS))
break;
queries->popIfTop(moveQuery);
}
logGlobal->trace("Hero %s ends movement", h->getNameTranslated());
return result != TryMoveHero::FAILED;

View File

@ -44,6 +44,7 @@ void TurnTimerHandler::setTimerEnabled(PlayerColor player, bool enabled)
std::lock_guard<std::recursive_mutex> guard(mx);
assert(player.isValidPlayer());
timers[player].isActive = enabled;
sendTimerUpdate(player);
}
void TurnTimerHandler::sendTimerUpdate(PlayerColor player)