From 1a34a22cb98b2cd48f5f11132c0d1e2ca914d517 Mon Sep 17 00:00:00 2001 From: Lynx3d Date: Sat, 2 Apr 2011 19:30:45 +0200 Subject: [PATCH] [11306] Fix problem in WmoLiquid::GetLiquidHeight() properly instead of ignoring case. Thanks Ambal for finding i though... --- src/game/vmap/WorldModel.cpp | 6 ++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/vmap/WorldModel.cpp b/src/game/vmap/WorldModel.cpp index fe52ccfd9..831a4e3be 100644 --- a/src/game/vmap/WorldModel.cpp +++ b/src/game/vmap/WorldModel.cpp @@ -150,10 +150,12 @@ namespace VMAP { float tx_f = (pos.x - iCorner.x)/LIQUID_TILE_SIZE; uint32 tx = uint32(tx_f); - if (tx >= iTilesX) return false; + if (tx_f < 0.0f || tx >= iTilesX) + return false; float ty_f = (pos.y - iCorner.y)/LIQUID_TILE_SIZE; uint32 ty = uint32(ty_f); - if (ty >= iTilesY) return false; + if (ty_f < 0.0f || ty >= iTilesY) + return false; // check if tile shall be used for liquid level // checking for 0x08 *might* be enough, but disabled tiles always are 0x?F: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 184a3e2e0..f0dac9905 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11305" + #define REVISION_NR "11306" #endif // __REVISION_NR_H__