summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 10:25:58 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 10:25:58 +0000
commit69162621d81c82b832cccc8d59179fc0e4472af2 (patch)
tree84b0875823153321225331b2a4a5862a60fdc345 /src/newgrf.cpp
parentb167c0a3967a62b4cbe98a12f2c4d932ee8df510 (diff)
downloadopenttd-69162621d81c82b832cccc8d59179fc0e4472af2.tar.xz
(svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 571779596..508eb15ba 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -2411,6 +2411,7 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, By
for (uint i = 0; i < SNOW_LINE_MONTHS; i++) {
for (uint j = 0; j < SNOW_LINE_DAYS; j++) {
table[i][j] = buf->ReadByte();
+ if (table[i][j] != 0xFF) table[i][j] /= TILE_HEIGHT;
}
}
SetSnowLine(table);
@@ -5512,7 +5513,7 @@ bool GetGlobalVariable(byte param, uint32 *value)
/* case 0x1F: // locale dependent settings not implemented to avoid desync */
case 0x20: // snow line height
- *value = _settings_game.game_creation.landscape == LT_ARCTIC ? GetSnowLine() : 0xFF;
+ *value = _settings_game.game_creation.landscape == LT_ARCTIC ? GetSnowLine() * TILE_HEIGHT : 0xFF;
return true;
case 0x21: // OpenTTD version