diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-31 21:16:40 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-31 21:16:40 +0000 |
commit | ef66b087845616892df69a916844accccb79777d (patch) | |
tree | ea9f8f7148df082942fd6a5fe3b3c51acf311d4f | |
parent | b5234641753597f497ce7d60505950a34d228666 (diff) | |
download | openttd-ef66b087845616892df69a916844accccb79777d.tar.xz |
(svn r12031) -Fix [FS#1689,FS#1719]: Prevent towns from removing or claiming ownership of player owned tiles when growing.
-rw-r--r-- | src/town_cmd.cpp | 2 | ||||
-rw-r--r-- | src/unmovable_cmd.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index f57916ea1..23606bb3f 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1189,7 +1189,7 @@ static int GrowTownAtRoad(Town *t, TileIndex tile) /* Don't allow building over roads of other cities */ if (IsTileOwner(tile, OWNER_TOWN) && GetTownByTile(tile) != t) { _grow_town_result = GROWTH_SUCCEED; - } else if (_game_mode == GM_EDITOR) { + } else if (IsTileOwner(tile, OWNER_NONE) && _game_mode == GM_EDITOR) { /* If we are in the SE, and this road-piece has no town owner yet, it just found an * owner :) (happy happy happy road now) */ SetTileOwner(tile, OWNER_TOWN); diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index dc4e3f3fe..45d4cbc30 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -264,6 +264,8 @@ static CommandCost ClearTile_Unmovable(TileIndex tile, byte flags) return_cmd_error(STR_5800_OBJECT_IN_THE_WAY); if (IsStatue(tile)) { + if (flags & DC_AUTO) return_cmd_error(STR_5800_OBJECT_IN_THE_WAY); + TownID town = GetStatueTownID(tile); ClrBit(GetTown(town)->statues, _current_player); InvalidateWindow(WC_TOWN_AUTHORITY, town); |