mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11068] Prevent infinity creature fall at fail get heght.
Also fix wrong use INVALID_HEIGHT as height value. It must be used only for _check_ height, and DON'T must use as real height value. Must fix some wrong height check results. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
21cc7cd179
commit
d699d0973b
4 changed files with 9 additions and 7 deletions
|
|
@ -1464,10 +1464,11 @@ bool Creature::FallGround()
|
|||
// use larger distance for vmap height search than in most other cases
|
||||
float tz = GetTerrain()->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true, MAX_FALL_DISTANCE);
|
||||
|
||||
if (tz < INVALID_HEIGHT)
|
||||
if (tz <= INVALID_HEIGHT)
|
||||
{
|
||||
DEBUG_LOG("FallGround: creature %u at map %u (x: %f, y: %f, z: %f), not able to retrive a proper GetHeight (z: %f).",
|
||||
GetEntry(), GetMap()->GetId(), GetPositionX(), GetPositionX(), GetPositionZ(), tz);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Abort too if the ground is very near
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue