diff -r ebf0ece7d8f6 -r eee46cb39750 src/landscape.cpp --- a/src/landscape.cpp Fri Nov 23 16:59:30 2007 +0000 +++ b/src/landscape.cpp Wed Jan 09 18:11:12 2008 +0000 @@ -5,23 +5,25 @@ #include "bridge_map.h" #include "heightmap.h" #include "clear_map.h" -#include "date.h" -#include "functions.h" -#include "map.h" #include "player.h" #include "spritecache.h" #include "table/sprites.h" -#include "tile.h" #include -#include "viewport.h" -#include "command.h" +#include "viewport_func.h" +#include "command_func.h" #include "landscape.h" -#include "vehicle.h" #include "variables.h" #include "void_map.h" #include "water_map.h" #include "tgp.h" #include "genworld.h" +#include "tile_cmd.h" +#include "core/alloc_func.hpp" +#include "fios.h" +#include "window_func.h" +#include "functions.h" +#include "date_func.h" +#include "vehicle_func.h" extern const TileTypeProcs _tile_type_clear_procs, @@ -522,8 +524,6 @@ */ CommandCost CmdLandscapeClear(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { - SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); - return _tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags); } @@ -535,7 +535,8 @@ */ CommandCost CmdClearArea(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { - CommandCost cost, ret, money; + CommandCost ret, money; + CommandCost cost(EXPENSES_CONSTRUCTION); int ex; int ey; int sx, sy; @@ -544,8 +545,6 @@ if (p1 >= MapSize()) return CMD_ERROR; - SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); - /* make sure sx,sy are smaller than ex,ey */ ex = TileX(tile); ey = TileY(tile);