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:
parent
cc3ca9a41e
commit
00216168bf
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user