summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-09 15:07:31 +0000
committersmatz <smatz@openttd.org>2008-02-09 15:07:31 +0000
commit802c94975523114d472cc2c37ccd858d3e6358a2 (patch)
tree39d675de46311d80d06cf6872b5082be1a1c732f /src/rail_cmd.cpp
parent221494bd3fa26c47294424b4c53f28f494a38a53 (diff)
downloadopenttd-802c94975523114d472cc2c37ccd858d3e6358a2.tar.xz
(svn r12094) -Codechange: use DC_BANKRUPT command flag when removing player property to allow further fixes
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index e3217ca72..03517b2c3 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -455,7 +455,7 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32
if (!IsLevelCrossing(tile) ||
GetCrossingRailBits(tile) != trackbit ||
(_current_player != OWNER_WATER && !CheckTileOwnership(tile)) ||
- !EnsureNoVehicleOnGround(tile)) {
+ (!(flags & DC_BANKRUPT) && !EnsureNoVehicleOnGround(tile))) {
return CMD_ERROR;
}
@@ -2146,7 +2146,7 @@ static void ChangeTileOwner_Track(TileIndex tile, PlayerID old_player, PlayerID
if (new_player != PLAYER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
- DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
+ DoCommand(tile, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR);
}
}