changeset 16028:58b52450e2ec draft

(svn r20721) -Fix: objects that can be built on water shouldn't be drowned.
author rubidium <rubidium@openttd.org>
date Thu, 02 Sep 2010 20:45:54 +0000
parents b8ab366dc9fa
children 4375e3c8647b
files src/object_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -374,6 +374,9 @@
 			/* Removing with the cheat costs more in TTDPatch / the specs. */
 			cost.MultiplyCost(25);
 		}
+	} else if ((spec->flags & (OBJECT_FLAG_BUILT_ON_WATER | OBJECT_FLAG_NOT_ON_LAND)) != 0) {
+		/* Water can't remove objects that are buildable on water. */
+		return CMD_ERROR;
 	}
 
 	switch (type) {