1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00

Merge branch 'develop' of https://github.com/vcmi/vcmi into develop

This commit is contained in:
DjWarmonger
2015-02-22 18:36:23 +01:00
4 changed files with 13 additions and 7 deletions

View File

@ -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;