From 69162621d81c82b832cccc8d59179fc0e4472af2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 4 Nov 2011 10:25:58 +0000 Subject: (svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code --- src/newgrf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/newgrf.cpp') 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 -- cgit v1.2.3-54-g00ecf