Changeset - r16039:578be62e0a41
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-09-05 13:28:59
frosch@openttd.org
(svn r20742) -Fix: Evaluate DC_NO_WATER flag when clearing objects built on water.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/object_cmd.cpp
Show inline comments
 
@@ -365,7 +365,10 @@ static CommandCost ClearTile_Object(Tile
 

	
 
	/* Water can remove everything! */
 
	if (_current_company != OWNER_WATER) {
 
		if ((spec->flags & OBJECT_FLAG_AUTOREMOVE) == 0 && flags & DC_AUTO) {
 
		if ((flags & DC_NO_WATER) && IsTileOnWater(tile)) {
 
			/* There is water under the object, treat it as water tile. */
 
			return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
 
		} else if (!(spec->flags & OBJECT_FLAG_AUTOREMOVE) && (flags & DC_AUTO)) {
 
			/* No automatic removal by overbuilding stuff. */
 
			return_cmd_error(type == OBJECT_HQ ? STR_ERROR_COMPANY_HEADQUARTERS_IN : STR_ERROR_OBJECT_IN_THE_WAY);
 
		} else if (_game_mode == GM_EDITOR) {
0 comments (0 inline, 0 general)