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_commons.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/newgrf_commons.cpp') diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 0bea74a13..e7ef0a01a 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -380,7 +380,7 @@ uint32 GetTerrainType(TileIndex tile, TileContext context) case MP_TUNNELBRIDGE: if (context == TCX_ON_BRIDGE) { - has_snow = (GetBridgePixelHeight(tile) > GetSnowLine()); + has_snow = (GetBridgeHeight(tile) > GetSnowLine()); } else { /* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */ if (_generating_world) goto genworld; // we do not care about foundations here @@ -393,13 +393,13 @@ uint32 GetTerrainType(TileIndex tile, TileContext context) case MP_INDUSTRY: case MP_OBJECT: /* These tiles usually have a levelling foundation. So use max Z */ - has_snow = (GetTileMaxPixelZ(tile) > GetSnowLine()); + has_snow = (GetTileMaxZ(tile) > GetSnowLine()); break; case MP_VOID: case MP_WATER: genworld: - has_snow = (GetTilePixelZ(tile) > GetSnowLine()); + has_snow = (GetTileZ(tile) > GetSnowLine()); break; default: NOT_REACHED(); -- cgit v1.2.3-54-g00ecf