Core/Collision: Replaced phasemask with proper phases in GameObject c…

…ollision calculation
This commit is contained in:
Aokromes
2017-05-06 01:55:17 +02:00
parent 27683014f2
commit 0fbcdca05e
29 changed files with 120 additions and 152 deletions

View File

@@ -495,7 +495,7 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool
if (_owner->IsFlying())
point.z = z;
else
point.z = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), point.x, point.y, z);
point.z = _owner->GetMap()->GetHeight(_owner->GetPhases(), point.x, point.y, z);
init.Path().push_back(point);
}
@@ -578,7 +578,7 @@ void MotionMaster::ResumeSplineChain(SplineChainResumeInfo const& info)
void MotionMaster::MoveFall(uint32 id /*=0*/)
{
// use larger distance for vmap height search than in most other cases
float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
float tz = _owner->GetMap()->GetHeight(_owner->GetPhases(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
TC_LOG_DEBUG("misc", "MotionMaster::MoveFall: unable to retrieve a proper height at map %u (x: %f, y: %f, z: %f).",