mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
CPathfinder: only allow water walking over accessible tiles
This commit is contained in:
@@ -292,7 +292,7 @@ bool CPathfinder::isMovementToDestPossible()
|
||||
break;
|
||||
|
||||
case EPathfindingLayer::WATER:
|
||||
if(!canMoveBetween(cp->coord, dp->coord) || dp->accessible == CGPathNode::BLOCKED)
|
||||
if(!canMoveBetween(cp->coord, dp->coord) || dp->accessible != CGPathNode::ACCESSIBLE)
|
||||
return false;
|
||||
if(isDestinationGuarded())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user