From 58785904a68392546101ba4a7653a7270f935813 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 5 Nov 2005 18:32:21 +0000 Subject: [PATCH] (svn r3142) Remove a now invalid case fall-through and use helper function instead of map access. --- npf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npf.c b/npf.c index 17dfa43108..6fa9429a19 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: