Mercurial > hg > openttd
changeset 3520:814461d693a4 draft
(svn r4376) -Codechange Renamed GetSignalState to GetSignalStateByTrackdir
author | celestar <celestar@openttd.org> |
---|---|
date | Wed, 12 Apr 2006 08:28:03 +0000 |
parents | 4fddce7e73a8 |
children | fb43c34a2b37 |
files | npf.c rail.h rail_cmd.c |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/npf.c +++ b/npf.c @@ -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 +++ b/rail.h @@ -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 +++ b/rail_cmd.c @@ -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.