(svn r3142) Remove a now invalid case fall-through and use helper function instead of map access.
authorpeter1138
Sat, 05 Nov 2005 18:32:21 +0000
changeset 2605 d9d7eecdd1f1
parent 2604 901508f52c3d
child 2606 7ae924de184b
(svn r3142) Remove a now invalid case fall-through and use helper function instead of map access.
npf.c
--- a/npf.c	Sat Nov 05 18:21:28 2005 +0000
+++ b/npf.c	Sat Nov 05 18:32:21 2005 +0000
@@ -417,12 +417,12 @@
 				cost = NPFTunnelCost(current);
 				break;
 			}
-			/* Fall through if above if is false, it is a bridge
-			 * then. We treat that as ordinary road */
+			cost = NPF_TILE_LENGTH;
+			break;
 		case MP_STREET:
 			cost = NPF_TILE_LENGTH;
 			/* Increase the cost for level crossings */
-			if ((_m[tile].m5 & 0xF0) == 0x10)
+			if (IsLevelCrossing(tile))
 				cost += _patches.npf_crossing_penalty;
 			break;
 		default: