diff options
author | Patric Stout <truebrain@openttd.org> | 2021-03-24 09:42:54 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-03-26 12:22:32 +0100 |
commit | 1a1049bc0db4e29402e950e56f3a6873c1f5a0ab (patch) | |
tree | 9b0919ad80fef38e3909a602bc2f3f3b7d51c2c7 /src/newgrf.cpp | |
parent | 23f27db8c30793384ca107db15548ea43dbdf329 (diff) | |
download | openttd-1a1049bc0db4e29402e950e56f3a6873c1f5a0ab.tar.xz |
Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.
Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.
Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 660da389c..7ac8bc945 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2739,13 +2739,13 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, By for (uint j = 0; j < SNOW_LINE_DAYS; j++) { table[i][j] = buf->ReadByte(); if (_cur.grffile->grf_version >= 8) { - if (table[i][j] != 0xFF) table[i][j] = table[i][j] * (1 + _settings_game.construction.max_heightlevel) / 256; + if (table[i][j] != 0xFF) table[i][j] = table[i][j] * (1 + _settings_game.construction.map_height_limit) / 256; } else { if (table[i][j] >= 128) { /* no snow */ table[i][j] = 0xFF; } else { - table[i][j] = table[i][j] * (1 + _settings_game.construction.max_heightlevel) / 128; + table[i][j] = table[i][j] * (1 + _settings_game.construction.map_height_limit) / 128; } } } @@ -6336,7 +6336,7 @@ bool GetGlobalVariable(byte param, uint32 *value, const GRFFile *grffile) case 0x20: { // snow line height byte snowline = GetSnowLine(); - if (_settings_game.game_creation.landscape == LT_ARCTIC && snowline <= _settings_game.construction.max_heightlevel) { + if (_settings_game.game_creation.landscape == LT_ARCTIC && snowline <= _settings_game.construction.map_height_limit) { *value = Clamp(snowline * (grffile->grf_version >= 8 ? 1 : TILE_HEIGHT), 0, 0xFE); } else { /* No snow */ @@ -7011,7 +7011,7 @@ static uint32 GetPatchVariable(uint8 param) /* The maximum height of the map. */ case 0x14: - return _settings_game.construction.max_heightlevel; + return _settings_game.construction.map_height_limit; /* Extra foundations base sprite */ case 0x15: |