summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-30 14:54:44 +0000
committerfrosch <frosch@openttd.org>2012-05-30 14:54:44 +0000
commit543540def81bd4cde1f29e8eac5236ce5ce079e9 (patch)
tree0133fd94f43eac397f2ffba103a0695716b2a8f8 /src
parente9ac7a40dfd4c768354e9360ebba165ed262b206 (diff)
downloadopenttd-543540def81bd4cde1f29e8eac5236ce5ce079e9.tar.xz
(svn r24302) -Fix: [Script] ScriptTown::GetGrowthRate() returned wrong values after usage of SetGrowthRate().
Diffstat (limited to 'src')
-rw-r--r--src/script/api/script_town.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp
index 0e16e905f..31b9ed0b1 100644
--- 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)