Skip to content

Commit

Permalink
Fix: typo in town growth rates (#7837)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yourself authored and planetmaker committed Nov 18, 2019
1 parent d242b18 commit 7e22f24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/town_cmd.cpp
Expand Up @@ -3362,7 +3362,7 @@ static uint GetNormalGrowthRate(Town *t)
{
static const uint16 _grow_count_values[2][6] = {
{ 120, 120, 120, 100, 80, 60 }, // Fund new buildings has been activated
{ 320, 420, 300, 220, 160, 100 } // Normal values
{ 420, 420, 300, 220, 160, 100 } // Normal values
};

int n = CountActiveStations(t);
Expand Down

1 comment on commit 7e22f24

@SamuXarick
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a typo, it's really 320.

https://github.com/OpenTTD/OpenTTD/blame/ccaaa7d33ac92f91ebddcf4d1f6537639a38a13c/src/town_cmd.cpp#L1698

if n = 0, then m = 160
if n != 0, then m = [210, 150, 110, 80, 50]

I assume there wasn't a slower growth option than normal back, the values were half back then. Fast forward to today, with simplifications in the code, n = 0 was included in the bracket and values doubled:
[320, 420, 300, 220, 160, 100]

Please sign in to comment.