mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-20 10:56:19 +01:00
(svn r2451) * Fix: Assertion caused by passing a trackdir where a track was expected.
This commit is contained in:
parent
8e53533786
commit
c81de3e1e9
2
npf.c
2
npf.c
@ -300,7 +300,7 @@ int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* parent) {
|
|||||||
* encounter, if it is red */
|
* encounter, if it is red */
|
||||||
|
|
||||||
/* Is this a presignal exit or combo? */
|
/* Is this a presignal exit or combo? */
|
||||||
SignalType sigtype = GetSignalType(tile, trackdir);
|
SignalType sigtype = GetSignalType(tile, TrackdirToTrack(trackdir));
|
||||||
if (sigtype == SIGTYPE_EXIT || sigtype == SIGTYPE_COMBO)
|
if (sigtype == SIGTYPE_EXIT || sigtype == SIGTYPE_COMBO)
|
||||||
/* Penalise exit and combo signals differently (heavier) */
|
/* Penalise exit and combo signals differently (heavier) */
|
||||||
cost += _patches.npf_rail_firstred_exit_penalty;
|
cost += _patches.npf_rail_firstred_exit_penalty;
|
||||||
|
Loading…
Reference in New Issue
Block a user