# HG changeset patch # User frosch # Date 2012-05-30 14:54:44 # Node ID 3bdce61e5d3731a97fe0b6d1456f5ec7580ff42d # Parent f2d13858ced4683eb9b29974c5ebcfb8cf08dd84 (svn r24302) -Fix: [Script] ScriptTown::GetGrowthRate() returned wrong values after usage of SetGrowthRate(). diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -152,7 +152,7 @@ const Town *t = ::Town::Get(town_id); - return (t->growth_rate * TOWN_GROWTH_TICKS + DAY_TICKS) / DAY_TICKS; + return ((t->growth_rate & ~TOWN_GROW_RATE_CUSTOM) * TOWN_GROWTH_TICKS + DAY_TICKS) / DAY_TICKS; } /* static */ int32 ScriptTown::GetDistanceManhattanToTile(TownID town_id, TileIndex tile)