mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
(svn r22654) [1.1] -Backport from trunk:
- Fix: Switching from a red to a white highlight (by switching to another tool) without switching the highlight mode (HT_RECT etc.) did not mark the selection dirty [FS#4670] (r22649) - Fix: [NewGRF] Parameters from NewGRFs were not properly parsed in all cases [FS#4599] (r22648, r22630, r22629, r22628, r22627) - Fix: GetSection() does not return a LockPart [FS#4678] (r22645) - Fix: [NewGRF] Disallow building NewObjects on water tiles owned by another company (r22643)
This commit is contained in:
@@ -215,6 +215,10 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
/* Normal water tiles don't have to be cleared. For all other tile types clear
|
||||
* the tile but leave the water. */
|
||||
cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_NO_WATER, CMD_LANDSCAPE_CLEAR));
|
||||
} else {
|
||||
/* Can't build on water owned by another company. */
|
||||
Owner o = GetTileOwner(t);
|
||||
if (o != OWNER_NONE && o != OWNER_WATER) cost.AddCost(CheckOwnership(o, t));
|
||||
}
|
||||
} else {
|
||||
if (!allow_ground) return_cmd_error(STR_ERROR_MUST_BE_BUILT_ON_WATER);
|
||||
|
||||
Reference in New Issue
Block a user