summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-18 01:35:15 +0000
committersmatz <smatz@openttd.org>2009-05-18 01:35:15 +0000
commit9af2e38d44abfe119b0c3e3b5647c6309cc979e2 (patch)
tree066c472f472affd3ba2b47df78bb6b955dcc285a /src
parent0af27062c4d17148f357c0da1f8b9ce996601463 (diff)
downloadopenttd-9af2e38d44abfe119b0c3e3b5647c6309cc979e2.tar.xz
(svn r16350) -Codechange: make some 'rail track is present' checks more 'secure'
Diffstat (limited to 'src')
-rw-r--r--src/elrail.cpp2
-rw-r--r--src/rail_cmd.cpp2
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;
}