mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
CPathfinder: only allow water walking over accessible tiles
This commit is contained in:
parent
62dc070c0a
commit
a1290f548b
@ -292,7 +292,7 @@ bool CPathfinder::isMovementToDestPossible()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EPathfindingLayer::WATER:
|
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;
|
return false;
|
||||||
if(isDestinationGuarded())
|
if(isDestinationGuarded())
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user