mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
This method replaces old convertPosition, but with more clear names and without hardcoded magic constants.
This commit is contained in:
@ -489,7 +489,7 @@ void CHeroMovementQuery::onExposure(QueryPtr topQuery)
|
||||
logGlobal->trace("Hero %s after victory over guard finishes visit to %s", hero->name, tmh.end.toString());
|
||||
//finish movement
|
||||
visitDestAfterVictory = false;
|
||||
gh->visitObjectOnTile(*gh->getTile(tmh.end - hero->getVisitableOffset()), hero);
|
||||
gh->visitObjectOnTile(*gh->getTile(hero->convertToVisitablePos(tmh.end)), hero);
|
||||
}
|
||||
|
||||
owner->popIfTop(*this);
|
||||
|
Reference in New Issue
Block a user