src/rail_cmd.cpp
changeset 9504 58b2ee0f53c9
parent 9503 231e0b6b5b54
child 9549 41ec95418e84
equal deleted inserted replaced
9503:231e0b6b5b54 9504:58b2ee0f53c9
  1380 				ret = DoCommand(tile, 0, track, flags, CMD_REMOVE_SINGLE_RAIL);
  1380 				ret = DoCommand(tile, 0, track, flags, CMD_REMOVE_SINGLE_RAIL);
  1381 				if (CmdFailed(ret)) return CMD_ERROR;
  1381 				if (CmdFailed(ret)) return CMD_ERROR;
  1382 				cost.AddCost(ret);
  1382 				cost.AddCost(ret);
  1383 			}
  1383 			}
  1384 
  1384 
  1385 			if (water_ground) {
  1385 			/* when bankrupting, don't make water dirty, there could be a ship on lower halftile */
       
  1386 			if (water_ground && !(flags & DC_BANKRUPT)) {
  1386 				if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
  1387 				if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
  1387 
  1388 
  1388 				/* The track was removed, and left a coast tile. Now also clear the water. */
  1389 				/* The track was removed, and left a coast tile. Now also clear the water. */
  1389 				if (flags & DC_EXEC) DoClearSquare(tile);
  1390 				if (flags & DC_EXEC) DoClearSquare(tile);
  1390 				cost.AddCost(_price.clear_water);
  1391 				cost.AddCost(_price.clear_water);