1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix AI movement

This commit is contained in:
Ivan Savenko 2023-12-10 19:18:15 +02:00
parent 65721123a1
commit e23cddac8c

View File

@ -1133,7 +1133,7 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, ui8 teleporting, boo
if (guardian && getVisitingHero(guardian) != nullptr)
return complainRet("Cannot move hero, destination monster is busy!");
if (objectToVisit && getVisitingHero(objectToVisit) != nullptr)
if (objectToVisit && getVisitingHero(objectToVisit) != nullptr && getVisitingHero(objectToVisit) != h)
return complainRet("Cannot move hero, destination object is busy!");
if (objectToVisit &&