mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Objects: replaced another IsFlying check with CanFly to make sure that hovering creatures will get their ground height returned properly
*also fixed a small typo in path generator
This commit is contained in:
@@ -2620,7 +2620,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
|
||||
if (Unit const* unit = ToUnit())
|
||||
{
|
||||
// flying, ignore.
|
||||
if (unit->IsFlying())
|
||||
if (unit->CanFly())
|
||||
return;
|
||||
|
||||
// fall back to gridHeight if any
|
||||
|
||||
@@ -41,7 +41,7 @@ PathGenerator::PathGenerator(const Unit* owner) :
|
||||
TC_LOG_DEBUG("maps.mmaps", "++ PathGenerator::PathGenerator for %u", _sourceUnit->GetGUID().GetCounter());
|
||||
|
||||
uint32 mapId = PhasingHandler::GetTerrainMapId(_sourceUnit->GetPhaseShift(), _sourceUnit->GetMap(), _sourceUnit->GetPositionX(), _sourceUnit->GetPositionY());
|
||||
if (DisableMgr::IsPathfindingEnabled(_sourceUnit->GetMapId()))
|
||||
if (DisableMgr::IsPathfindingEnabled(mapId))
|
||||
{
|
||||
MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager();
|
||||
_navMesh = mmap->GetNavMesh(mapId);
|
||||
|
||||
Reference in New Issue
Block a user