diff options
author | peter1138 <peter1138@openttd.org> | 2006-01-22 09:52:20 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-01-22 09:52:20 +0000 |
commit | 128249e63e319437b204169c9d0c5fcd2c19d7fb (patch) | |
tree | 5d29a5911d89f91056a50e780bd4409ed3dda95b | |
parent | a1342c9d5250687dcb7d2f1d174f68126267ffa5 (diff) | |
download | openttd-128249e63e319437b204169c9d0c5fcd2c19d7fb.tar.xz |
(svn r3416) - Fix: Disallow building an oil rig above sea level.
-rw-r--r-- | industry_cmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index ac5320005..4883e2078 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -1170,7 +1170,8 @@ static bool CheckNewIndustry_Oil(TileIndex tile, int type) { if (_game_mode == GM_EDITOR && _ignore_restrictions) return true; if (_game_mode == GM_EDITOR && type != IT_OIL_RIG) return true; - if (DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16) return true; + if ((type != IT_OIL_RIG || TileHeight(tile) == 0) && + DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16) return true; _error_message = STR_483B_CAN_ONLY_BE_POSITIONED; return false; |