mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Fix finishing turn while flying over object
This commit is contained in:
parent
0c38187916
commit
380ee41fba
@ -2323,7 +2323,17 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, ui8 teleporting, boo
|
||||
visitObjectOnTile(t, h);
|
||||
}
|
||||
|
||||
queries.popIfTop(moveQuery);
|
||||
if(!transit)
|
||||
{
|
||||
for(auto topQuery = queries.topQuery(h->tempOwner); true; topQuery = queries.topQuery(h->tempOwner))
|
||||
{
|
||||
moveQuery = std::dynamic_pointer_cast<CHeroMovementQuery>(topQuery);
|
||||
if(moveQuery)
|
||||
queries.popIfTop(moveQuery);
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
logGlobal->trace("Hero %s ends movement", h->getNameTranslated());
|
||||
return result != TryMoveHero::FAILED;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user