changeset 2605:9c0de45d8f66 draft

(svn r3142) Remove a now invalid case fall-through and use helper function instead of map access.
author peter1138 <peter1138@openttd.org>
date Sat, 05 Nov 2005 18:32:21 +0000
parents bc9279c4ac9e
children 2b69d24b67f6
files npf.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/npf.c
+++ b/npf.c
@@ -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: