Solve many of the creature falling through floor issues.

This seems entirely wrong to discount the returned map height if we're
already below it. In many cases this is exactly why we want the height!

(cherry picked from commit 10550fe8cf)
This commit is contained in:
r00ty-tc
2016-02-26 22:02:20 +00:00
committed by DDuarte
parent ff3e176eb1
commit bf85d8d07f

View File

@@ -2347,9 +2347,9 @@ float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float
{
// we have mapheight and vmapheight and must select more appropriate
// we are already under the surface or vmap height above map heigt
// vmap height above map height
// or if the distance of the vmap height is less the land height distance
if (z < mapHeight || vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
if (vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
return vmapHeight;
else
return mapHeight; // better use .map surface height