summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-09 13:10:04 +0000
committerrubidium <rubidium@openttd.org>2007-07-09 13:10:04 +0000
commitc29b4a77208140b1892508ee80204b331e41f745 (patch)
tree9ed2d87746c45c023f8dd8726f476706828c1f3e /src
parent70d6fdeca0e975432c42b1e8ff0f930106a480d0 (diff)
downloadopenttd-c29b4a77208140b1892508ee80204b331e41f745.tar.xz
(svn r10484) -Codechange: reduce code duplication.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_canal.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp
index 9a4ebe233..f7ee308e3 100644
--- a/src/newgrf_canal.cpp
+++ b/src/newgrf_canal.cpp
@@ -7,6 +7,7 @@
#include "debug.h"
#include "newgrf.h"
#include "newgrf_callbacks.h"
+#include "newgrf_commons.h"
#include "newgrf_spritegroup.h"
#include "newgrf_canal.h"
@@ -44,8 +45,7 @@ static uint32 CanalGetVariable(const ResolverObject *object, byte variable, byte
return TileHeight(tile);
case 0x81:
- return ((_opt.landscape == LT_ARCTIC && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) |
- (_opt.landscape == LT_TROPIC ? GetTropicZone(tile) : 0);
+ return GetTerrainType(tile);
}
DEBUG(grf, 1, "Unhandled canal property 0x%02X", variable);