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:
@@ -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;
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user