mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-13 22:06:58 +02:00
Fix town visit via Town Portal not generating town visit query
This commit is contained in:
parent
ce4548718c
commit
40dff8ac17
@ -973,12 +973,11 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, EMovementMode moveme
|
||||
doMove(TryMoveHero::TELEPORTATION, guardsCheck, DONT_VISIT_DEST, LEAVING_TILE);
|
||||
|
||||
// visit town for town portal \ castle gates
|
||||
// do not use generic visitObjectOnTile to avoid double-teleporting
|
||||
// if this moveHero call was triggered by teleporter
|
||||
// do not visit any other objects, e.g. monoliths to avoid double-teleporting
|
||||
if (objectToVisit)
|
||||
{
|
||||
if (CGTownInstance * town = dynamic_cast<CGTownInstance *>(objectToVisit))
|
||||
town->onHeroVisit(h);
|
||||
objectVisited(town, h);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user