diff options
author | megamage <none@none> | 2009-02-12 17:09:15 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-12 17:09:15 -0600 |
commit | 6aee5fcbe7473a3cbac12b7e8482a7b98bef8be3 (patch) | |
tree | 91ec91d5c19eba9c2fe0e84b1c9dc7047a3de80e /src/game/Map.cpp | |
parent | 2d2f433b4de1c35b22aaf07854fc0ee11fcb350d (diff) | |
parent | f385747164c3fb278c92ef46fbd6c3da6590bbf0 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 8a05d4d8380..40df012410b 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1271,22 +1271,22 @@ float Map::GetHeight(float x, float y, float z, bool pUseVmaps) const float Map::GetVmapHeight(float x, float y, float z, bool useMaps) const { - float mapHeight; - float vmapHeight; - if (useMaps) - { - mapHeight = GetHeight(x, y, z, false); - if (fabs(mapHeight - z) < 0.1) - return mapHeight; - } - else - mapHeight = INVALID_HEIGHT; - VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); - if (vmgr->isLineOfSightCalcEnabled()) - bool result = vmgr->getObjectHitPos(GetId(), x, y, z + 2.0f, x, y, mapHeight, x, y, vmapHeight, 0); - else - return INVALID_HEIGHT; - return vmapHeight; + float mapHeight; + float vmapHeight; + if (useMaps) + { + mapHeight = GetHeight(x, y, z, false); + if (fabs(mapHeight - z) < 0.1) + return mapHeight; + } + else + mapHeight = INVALID_HEIGHT; + VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); + if (vmgr->isLineOfSightCalcEnabled()) + bool result = vmgr->getObjectHitPos(GetId(), x, y, z + 2.0f, x, y, mapHeight, x, y, vmapHeight, 0); + else + return INVALID_HEIGHT; + return vmapHeight; } uint16 Map::GetAreaFlag(float x, float y, float z) const |