summaryrefslogtreecommitdiff
path: root/src/newgrf_town.cpp
diff options
context:
space:
mode:
authorPavel Stupnikov <dp@dpointer.org>2018-05-02 22:01:30 +0300
committerfrosch <github@elsenhans.name>2018-05-02 21:01:30 +0200
commitfef8b831a93a0fc772fc8a0b7799ec51cd86a967 (patch)
tree327b1463e2d0828bb5d5036370517c3abdc77709 /src/newgrf_town.cpp
parent61515c9abd6fb31e24c5fd610a9f6b3a899c7171 (diff)
downloadopenttd-fef8b831a93a0fc772fc8a0b7799ec51cd86a967.tar.xz
Change: Switch town growth rate and counter to actual game ticks (#6763)
Diffstat (limited to 'src/newgrf_town.cpp')
-rw-r--r--src/newgrf_town.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp
index 820e2be68..00fcf76b6 100644
--- a/src/newgrf_town.cpp
+++ b/src/newgrf_town.cpp
@@ -50,7 +50,7 @@
case 0x81: return GB(this->t->xy, 8, 8);
case 0x82: return ClampToU16(this->t->cache.population);
case 0x83: return GB(ClampToU16(this->t->cache.population), 8, 8);
- case 0x8A: return this->t->grow_counter;
+ case 0x8A: return this->t->grow_counter / TOWN_GROWTH_TICKS;
case 0x92: return this->t->flags; // In original game, 0x92 and 0x93 are really one word. Since flags is a byte, this is to adjust
case 0x93: return 0;
case 0x94: return ClampToU16(this->t->cache.squared_town_zone_radius[0]);
@@ -82,7 +82,7 @@
case 0xAE: return this->t->have_ratings;
case 0xB2: return this->t->statues;
case 0xB6: return ClampToU16(this->t->cache.num_houses);
- case 0xB9: return this->t->growth_rate & (~TOWN_GROW_RATE_CUSTOM);
+ case 0xB9: return this->t->growth_rate / TOWN_GROWTH_TICKS;
case 0xBA: return ClampToU16(this->t->supplied[CT_PASSENGERS].new_max);
case 0xBB: return GB(ClampToU16(this->t->supplied[CT_PASSENGERS].new_max), 8, 8);
case 0xBC: return ClampToU16(this->t->supplied[CT_MAIL].new_max);