changeset 16039:6f17901e8aec draft

(svn r20732) -Fix: when trying to build a bridge over an object, try to autoremove the object if it's too high
author yexo <yexo@openttd.org>
date Fri, 03 Sep 2010 23:48:12 +0000
parents cf5ef4e1aa91
children e8f4b3e0808c
files src/tunnelbridge_cmd.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -394,7 +394,7 @@
 				case MP_OBJECT: {
 					const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
 					if ((spec->flags & OBJECT_FLAG_ALLOW_UNDER_BRIDGE) == 0) goto not_valid_below;
-					if (GetTileMaxZ(tile) + spec->height * TILE_HEIGHT > z_start) return_cmd_error(STR_ERROR_OBJECT_IN_THE_WAY);
+					if (GetTileMaxZ(tile) + spec->height * TILE_HEIGHT > z_start) goto not_valid_below;
 					break;
 				}