summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-11-05 18:32:21 +0000
committerpeter1138 <peter1138@openttd.org>2005-11-05 18:32:21 +0000
commitacf4b5181dcd9d72e4705d354e3faaa73b355611 (patch)
treee4a301176a0d726e3c9c4fe092c253443139b52f
parent4c6a67a723cfc110fef7f29dc098c27a9e9c8695 (diff)
downloadopenttd-acf4b5181dcd9d72e4705d354e3faaa73b355611.tar.xz
(svn r3142) Remove a now invalid case fall-through and use helper function instead of map access.
-rw-r--r--npf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/npf.c b/npf.c
index 17dfa4310..6fa9429a1 100644
--- a/npf.c
+++ b/npf.c
@@ -417,12 +417,12 @@ static int32 NPFRoadPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
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: