summaryrefslogtreecommitdiff
path: root/src/newgrf_canal.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-07-10 13:04:04 +0000
committerfrosch <frosch@openttd.org>2011-07-10 13:04:04 +0000
commita7f7a978250009beb4f6453c145c7425cbcb57ce (patch)
tree9900a75be94b69838566a0cf1330164d860af146 /src/newgrf_canal.cpp
parentd4dbe95274b636e22d98e9981f178aec128fa491 (diff)
downloadopenttd-a7f7a978250009beb4f6453c145c7425cbcb57ce.tar.xz
(svn r22646) -Codechange: Simplify MP_WATER map accessors, esp. for locks and depots. (based on patched by adf88 and michi_cc)
Diffstat (limited to 'src/newgrf_canal.cpp')
-rw-r--r--src/newgrf_canal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp
index b62698a7b..d51668456 100644
--- a/src/newgrf_canal.cpp
+++ b/src/newgrf_canal.cpp
@@ -50,7 +50,7 @@ static uint32 CanalGetVariable(const ResolverObject *object, byte variable, byte
case 0x80: {
uint z = GetTileZ(tile) / TILE_HEIGHT;
/* Return consistent height within locks */
- if (IsTileType(tile, MP_WATER) && IsLock(tile) && GetSection(tile) >= 8) z--;
+ if (IsTileType(tile, MP_WATER) && IsLock(tile) && GetLockPart(tile) == LOCK_PART_UPPER) z--;
return z;
}