Mercurial > hg > openttd
changeset 2868:71a3558bdb14 draft
(svn r3416) - Fix: Disallow building an oil rig above sea level.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Sun, 22 Jan 2006 09:52:20 +0000 |
parents | db43cbd6755b |
children | d3deab6084b7 |
files | industry_cmd.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/industry_cmd.c +++ b/industry_cmd.c @@ -1170,7 +1170,8 @@ { 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;