summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-06-23 20:18:29 +0000
committerfrosch <frosch@openttd.org>2012-06-23 20:18:29 +0000
commitd49684582040dd99f5dfdb66d8f2b834af09bcc1 (patch)
treedbff08b358966746ee75539a919fcbd007c27835
parent0fd41221c371d492563881bd9813b95d98a426fc (diff)
downloadopenttd-d49684582040dd99f5dfdb66d8f2b834af09bcc1.tar.xz
(svn r24356) -Change: Allow building/modifying/removing signals even if a train is on the belonging track.
-rw-r--r--src/rail_cmd.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index c66c72595..12be60f35 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -986,13 +986,10 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1,
!HasTrack(tile, track)) {
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);
}
- CommandCost ret = EnsureNoTrainOnTrack(tile, track);
- if (ret.Failed()) return ret;
-
/* Protect against invalid signal copying */
if (p2 != 0 && (p2 & SignalOnTrack(track)) == 0) return CMD_ERROR;
- ret = CheckTileOwnership(tile);
+ CommandCost ret = CheckTileOwnership(tile);
if (ret.Failed()) return ret;
{
@@ -1400,8 +1397,6 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1
if (!HasSignalOnTrack(tile, track)) {
return_cmd_error(STR_ERROR_THERE_ARE_NO_SIGNALS);
}
- CommandCost ret = EnsureNoTrainOnTrack(tile, track);
- if (ret.Failed()) return ret;
/* Only water can remove signals from anyone */
if (_current_company != OWNER_WATER) {