summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npf.c2
-rw-r--r--rail.h2
-rw-r--r--rail_cmd.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/npf.c b/npf.c
index af2bb2745..f1e474c30 100644
--- a/npf.c
+++ b/npf.c
@@ -342,7 +342,7 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare
/* Check for signals */
if (IsTileType(tile, MP_RAILWAY) && HasSignalOnTrackdir(tile, trackdir)) {
/* Ordinary track with signals */
- if (GetSignalState(tile, trackdir) == SIGNAL_STATE_RED) {
+ if (GetSignalStateByTrackdir(tile, trackdir) == SIGNAL_STATE_RED) {
/* Signal facing us is red */
if (!NPFGetFlag(current, NPF_FLAG_SEEN_SIGNAL)) {
/* Penalize the first signal we
diff --git a/rail.h b/rail.h
index 9ea050f04..36b9f00e9 100644
--- a/rail.h
+++ b/rail.h
@@ -414,7 +414,7 @@ static inline bool HasSignalOnTrackdir(TileIndex tile, Trackdir trackdir)
* Along meaning if you are currently driving on the given trackdir, this is
* the signal that is facing us (for which we stop when it's red).
*/
-static inline SignalState GetSignalState(TileIndex tile, Trackdir trackdir)
+static inline SignalState GetSignalStateByTrackdir(TileIndex tile, Trackdir trackdir)
{
assert(IsValidTrackdir(trackdir));
assert(HasSignalOnTrack(tile, TrackdirToTrack(trackdir)));
diff --git a/rail_cmd.c b/rail_cmd.c
index 577f82b6b..ba6e4d16b 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1504,7 +1504,7 @@ static bool SetSignalsEnumProc(TileIndex tile, SetSignalsData *ssd, int track, u
if (HasSignalOnTrackdir(tile, track) && _m[tile].m4 & 2) {
// this is an exit signal that points out from the segment
ssd->presignal_exits++;
- if (GetSignalState(tile, track) != SIGNAL_STATE_RED)
+ if (GetSignalStateByTrackdir(tile, track) != SIGNAL_STATE_RED)
ssd->presignal_exits_free++;
}
@@ -1653,7 +1653,7 @@ static void ChangeSignalStates(SetSignalsData *ssd)
// subtract for dual combo signals so they don't count themselves
if (_m[tile].m4 & 2 && HasSignalOnTrackdir(tile, ssd->bit[i])) {
ex--;
- if (GetSignalState(tile, ssd->bit[i]) != SIGNAL_STATE_RED) exfree--;
+ if (GetSignalStateByTrackdir(tile, ssd->bit[i]) != SIGNAL_STATE_RED) exfree--;
}
// if we have exits and none are free, make red.