Core/Map: fix NPCs falling through the textures (#482)
this should stop creatures falling through the map (ie. if a cave is under the mountin)
This commit is contained in:
parent
c5b8d94dac
commit
f711316adc
1 changed files with 1 additions and 1 deletions
|
|
@ -1813,7 +1813,7 @@ float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float
|
|||
|
||||
// we are already under the surface or vmap height above map heigt
|
||||
// or if the distance of the vmap height is less the land height distance
|
||||
if (z < mapHeight || vmapHeight > mapHeight || fabs(mapHeight-z) > fabs(vmapHeight-z))
|
||||
if (vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
|
||||
return vmapHeight;
|
||||
else
|
||||
return mapHeight; // better use .map surface height
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue