From 181b36ca0b4a8b61537cafb99c7990e73c26408b Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 20 Apr 2008 08:43:31 +0000 Subject: (svn r12801) -Codechange: remove the dependency of function.h in town_map.h --- src/town_cmd.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/town_cmd.cpp') diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 66cc9e945..45de37aeb 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -45,6 +45,9 @@ #include "economy_func.h" #include "station_func.h" #include "cheat_func.h" +#include "functions.h" +#include "animated_tile_func.h" +#include "date_func.h" #include "table/strings.h" #include "table/sprites.h" @@ -268,7 +271,10 @@ static void AnimateTile_Town(TileIndex tile) pos += (pos < dest) ? 1 : -1; SetLiftPosition(tile, pos); - if (pos == dest) HaltLift(tile); + if (pos == dest) { + HaltLift(tile); + DeleteAnimatedTile(tile); + } MarkTileDirtyByTile(tile); } @@ -385,6 +391,7 @@ static void MakeSingleHouseBigger(TileIndex tile) /* Now that construction is complete, we can add the population of the * building to the town. */ ChangePopulation(GetTownByTile(tile), GetHouseSpecs(GetHouseType(tile))->population); + SetHouseConstructionYear(tile, _cur_year); } MarkTileDirtyByTile(tile); } @@ -1644,6 +1651,9 @@ static inline void ClearMakeHouseTile(TileIndex tile, TownID tid, byte counter, assert(CmdSucceeded(cc)); MakeHouseTile(tile, tid, counter, stage, type, random_bits); + if (GetHouseSpecs(type)->building_flags & BUILDING_IS_ANIMATED) AddAnimatedTile(tile); + + MarkTileDirtyByTile(tile); } -- cgit v1.2.3-54-g00ecf