diff options
author | rubidium <rubidium@openttd.org> | 2008-01-09 16:55:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-09 16:55:48 +0000 |
commit | 0365c1f33ba130bcfc663309b806fe65d730381f (patch) | |
tree | a0181571819fca45c3cc170c7ce718009cb12535 /src/landscape.cpp | |
parent | 98b4fa7c070f2433539f2c399129c24fba842632 (diff) | |
download | openttd-0365c1f33ba130bcfc663309b806fe65d730381f.tar.xz |
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r-- | src/landscape.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp index 8c1a83711..3c0e52a7f 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -524,8 +524,6 @@ void ClearSnowLine(void) */ 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); } @@ -537,7 +535,8 @@ CommandCost CmdLandscapeClear(TileIndex tile, uint32 flags, uint32 p1, uint32 p2 */ 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; @@ -546,8 +545,6 @@ CommandCost CmdClearArea(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) 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); |