From 9af2e38d44abfe119b0c3e3b5647c6309cc979e2 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 18 May 2009 01:35:15 +0000 Subject: (svn r16350) -Codechange: make some 'rail track is present' checks more 'secure' --- src/elrail.cpp | 2 +- src/rail_cmd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/elrail.cpp b/src/elrail.cpp index 432ae60ba..81ee510e4 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -116,7 +116,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override) */ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks) { - if (!IsPlainRail(t)) return tracks; + if (!IsPlainRailTile(t)) return tracks; TrackdirBits neighbour_tdb = TRACKDIR_BIT_NONE; for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) { diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 428779a32..eb0c137a8 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -827,7 +827,7 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1, /* You can only build signals on plain rail tiles, and the selected track must exist */ if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || - !EnsureNoTrainOnTrack(tile, track) || !HasTrack(tile, track)) { + !HasTrack(tile, track) || !EnsureNoTrainOnTrack(tile, track)) { return CMD_ERROR; } -- cgit v1.2.3-70-g09d2