Core/Movement: merged Collision height handling from 335 branch to reduce the probability that creatures are falling under the map
This commit is contained in:
1 parent
3357ae7940
commit
50a91bd590
16 files changed
+134
-138
No files matched your search
@@ -117,12 +117,7 @@ void FleeingMovementGenerator<T>::SetTargetLocation(T* owner)
|
||||
|
||||
// Add LOS check for target point
|
||||
Position mypos = owner->GetPosition();
|
||||
bool isInLOS = VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(
|
||||
PhasingHandler::GetTerrainMapId(owner->GetPhaseShift(), owner->GetMap(), mypos.m_positionX, mypos.m_positionY),
|
||||
mypos.m_positionX, mypos.m_positionY, mypos.m_positionZ + 2.0f, destination.m_positionX, destination.m_positionY,
|
||||
destination.m_positionZ + 2.0f, VMAP::ModelIgnoreFlags::Nothing);
|
||||
|
||||
if (!isInLOS)
|
||||
if (!owner->IsWithinLOS(destination.GetPositionX(), destination.GetPositionY(), destination.GetPositionZ()))
|
||||
{
|
||||
_timer.Reset(200);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user