(svn r10484) -Codechange: reduce code duplication.
authorrubidium
Mon, 09 Jul 2007 13:10:04 +0000
changeset 7206 fbba6cb67bc8
parent 7205 0a6d45455ae5
child 7207 277c6c315403
(svn r10484) -Codechange: reduce code duplication.
src/newgrf_canal.cpp
--- a/src/newgrf_canal.cpp	Sun Jul 08 19:54:51 2007 +0000
+++ b/src/newgrf_canal.cpp	Mon Jul 09 13:10:04 2007 +0000
@@ -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 @@
 			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);