Core/Maps: Fixed retrieving terrain info when on child maps
This commit is contained in:
1 parent
f76990a37b
commit
eeb2f63b65
10 files changed
+92
-99
No files matched your search
@@ -3466,7 +3466,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
|
||||
// Unit is flying. Do a VMap check to avoid moving the position into walls or obstacles
|
||||
if (path.GetPathType() & PATHFIND_NOT_USING_PATH)
|
||||
{
|
||||
uint32 terrainMapId = PhasingHandler::GetTerrainMapId(GetPhaseShift(), GetMap()->GetTerrain(), pos.m_positionX, pos.m_positionY);
|
||||
uint32 terrainMapId = PhasingHandler::GetTerrainMapId(GetPhaseShift(), GetMapId(), GetMap()->GetTerrain(), pos.m_positionX, pos.m_positionY);
|
||||
col = VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(terrainMapId,
|
||||
pos.m_positionX, pos.m_positionY, pos.m_positionZ + halfHeight,
|
||||
destx, desty, destz + halfHeight,
|
||||
|
||||
Reference in new issue
Block a user