--- a/npf.c Wed Apr 12 08:06:08 2006 +0000
+++ b/npf.c Wed Apr 12 08:28:03 2006 +0000
@@ -342,7 +342,7 @@
/* 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
--- a/rail.h Wed Apr 12 08:06:08 2006 +0000
+++ b/rail.h Wed Apr 12 08:28:03 2006 +0000
@@ -414,7 +414,7 @@
* 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)));
--- a/rail_cmd.c Wed Apr 12 08:06:08 2006 +0000
+++ b/rail_cmd.c Wed Apr 12 08:28:03 2006 +0000
@@ -1504,7 +1504,7 @@
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 @@
// 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.