summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-07 18:24:41 +0000
committeralberth <alberth@openttd.org>2010-03-07 18:24:41 +0000
commit55f8d5d80234bbeb7668c6d3263687185cd263d9 (patch)
tree8dfcf7d8ca049547e39e95a32edd6be55fbfd834 /src/rail_cmd.cpp
parentf0de6366bac6857a85fe1677fb6703b8be187be4 (diff)
downloadopenttd-55f8d5d80234bbeb7668c6d3263687185cd263d9.tar.xz
(svn r19369) -Codechange: EnsureNoTrainOnTrackBits() returns a CommandCost now.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 19c044e31..7bab2a254 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -155,7 +155,9 @@ static const byte _track_sloped_sprites[14] = {
static bool EnsureNoTrainOnTrack(TileIndex tile, Track track)
{
TrackBits rail_bits = TrackToTrackBits(track);
- return EnsureNoTrainOnTrackBits(tile, rail_bits);
+ CommandCost ret = EnsureNoTrainOnTrackBits(tile, rail_bits);
+ ret.SetGlobalErrorMessage();
+ return ret.Succeeded();
}
/** Check that the new track bits may be built.