|
|
@@ -1747,7 +1747,11 @@ bool CGameHandler::moveHero( ObjectInstanceID hid, int3 dst, ui8 teleporting, Pl
|
|
|
tmh.result = result;
|
|
|
sendAndApply(&tmh);
|
|
|
|
|
|
- if(lookForGuards == CHECK_FOR_GUARDS && this->isInTheMap(guardPos))
|
|
|
+ if (visitDest == VISIT_DEST && t.topVisitableObj() && t.topVisitableObj()->id == h->id)
|
|
|
+ { // Hero should be always able to visit any object he staying on even if there guards around
|
|
|
+ visitObjectOnTile(t, h);
|
|
|
+ }
|
|
|
+ else if(lookForGuards == CHECK_FOR_GUARDS && this->isInTheMap(guardPos))
|
|
|
{
|
|
|
tmh.attackedFrom = guardPos;
|
|
|
|