(svn r22646) -Codechange: Simplify MP_WATER map accessors, esp. for locks and depots. (based on patched by adf88 and michi_cc)

This commit is contained in:
frosch
2011-07-10 13:04:04 +00:00
parent 2ebf8fa584
commit ba358638a8
6 changed files with 127 additions and 81 deletions

View File

@@ -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;
}