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

Merge pull request #959 from kambala-decapitator/fix-cursor-attack

fix cursor image on hover when there're multiple creatures nearby
This commit is contained in:
Andrii Danylchenko
2022-09-25 17:44:10 +03:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -1711,8 +1711,7 @@ void CAdvMapInt::tileHovered(const int3 &mapPos)
}
else if(const CGHeroInstance * h = curHero())
{
int3 mapPosCopy = mapPos;
const CGPathNode * pnode = LOCPLINT->cb->getPathsInfo(h)->getPathInfo(mapPosCopy);
const CGPathNode * pnode = LOCPLINT->cb->getPathsInfo(h)->getPathInfo(mapPos);
assert(pnode);
int turns = pnode->turns;

View File

@@ -903,7 +903,7 @@ CGPathNode::ENodeAction CPathfinder::getTeleportDestAction() const
bool CPathfinder::isDestinationGuardian() const
{
return gs->guardingCreaturePosition(source.node->coord) == destination.node->coord;
return gs->guardingCreaturePosition(destination.node->coord) == destination.node->coord;
}
void CPathfinderHelper::initializePatrol()