(svn r10838) -Fix [FS#1119] (r10698): double negation where only single negation was needed. Patch by frosch.
authorrubidium
Fri, 10 Aug 2007 13:27:07 +0000
changeset 7433 0bb8f8206996
parent 7432 0a0cff8595dd
child 7434 d8f97a247304
(svn r10838) -Fix [FS#1119] (r10698): double negation where only single negation was needed. Patch by frosch.
src/ai/trolly/pathfinder.cpp
--- a/src/ai/trolly/pathfinder.cpp	Fri Aug 10 13:11:53 2007 +0000
+++ b/src/ai/trolly/pathfinder.cpp	Fri Aug 10 13:27:07 2007 +0000
@@ -419,7 +419,7 @@
 			} else {
 				if (!IsRoad(parent->path.node.tile) || !IsTileType(parent->path.node.tile, MP_TUNNELBRIDGE)) {
 					Foundation f = GetRoadFoundation(parent_tileh, (RoadBits)AiNew_GetRoadDirection(parent->path.parent->node.tile, parent->path.node.tile, current->tile));
-					if (IsInclinedFoundation(f) || (!IsFoundation(f) == 0 && HASBIT(BRIDGE_NO_FOUNDATION, parent_tileh))) {
+					if (IsInclinedFoundation(f) || (!IsFoundation(f) && HASBIT(BRIDGE_NO_FOUNDATION, parent_tileh))) {
 						res += AI_PATHFINDER_TILE_GOES_UP_PENALTY;
 					} else {
 						res += AI_PATHFINDER_FOUNDATION_PENALTY;