mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-15 02:29:10 +00:00
(svn r3142) Remove a now invalid case fall-through and use helper function instead of map access.
This commit is contained in:
6
npf.c
6
npf.c
@@ -417,12 +417,12 @@ static int32 NPFRoadPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
|
|||||||
cost = NPFTunnelCost(current);
|
cost = NPFTunnelCost(current);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Fall through if above if is false, it is a bridge
|
cost = NPF_TILE_LENGTH;
|
||||||
* then. We treat that as ordinary road */
|
break;
|
||||||
case MP_STREET:
|
case MP_STREET:
|
||||||
cost = NPF_TILE_LENGTH;
|
cost = NPF_TILE_LENGTH;
|
||||||
/* Increase the cost for level crossings */
|
/* Increase the cost for level crossings */
|
||||||
if ((_m[tile].m5 & 0xF0) == 0x10)
|
if (IsLevelCrossing(tile))
|
||||||
cost += _patches.npf_crossing_penalty;
|
cost += _patches.npf_crossing_penalty;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user