Selaa lähdekoodia

CPathfinder: only allow water walking over accessible tiles

ArseniyShestakov 10 vuotta sitten
vanhempi
sitoutus
a1290f548b
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/CPathfinder.cpp

+ 1 - 1
lib/CPathfinder.cpp

@@ -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;