mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
fix(Core/Tools): Revert "Handle different slopes in mmaps and Add so… (#12111)
...me more input parameters to improve"
This reverts commit b544eb420e.
Fixes #12079
This commit is contained in:
@@ -641,12 +641,12 @@ void PathGenerator::CreateFilter()
|
||||
|
||||
// creatures don't take environmental damage
|
||||
if (creature->CanEnterWater())
|
||||
includeFlags |= (NAV_WATER | NAV_MAGMA_SLIME);
|
||||
includeFlags |= (NAV_WATER | NAV_MAGMA);
|
||||
}
|
||||
else // assume Player
|
||||
{
|
||||
// perfect support not possible, just stay 'safe'
|
||||
includeFlags |= (NAV_GROUND | NAV_WATER | NAV_MAGMA_SLIME);
|
||||
includeFlags |= (NAV_GROUND | NAV_WATER | NAV_MAGMA);
|
||||
}
|
||||
|
||||
_filter.setIncludeFlags(includeFlags);
|
||||
@@ -671,17 +671,13 @@ void PathGenerator::UpdateFilter()
|
||||
_filter.setIncludeFlags(includedFlags);
|
||||
}
|
||||
|
||||
if (Creature const* _sourceCreature = _source->ToCreature())
|
||||
{
|
||||
/*if (Creature const* _sourceCreature = _source->ToCreature())
|
||||
if (_sourceCreature->IsInCombat() || _sourceCreature->IsInEvadeMode())
|
||||
{
|
||||
_filter.setIncludeFlags(_filter.getIncludeFlags() | NAV_GROUND_STEEP);
|
||||
}
|
||||
}
|
||||
_filter.setIncludeFlags(_filter.getIncludeFlags() | NAV_GROUND_STEEP);*/
|
||||
}
|
||||
}
|
||||
|
||||
NavTerrainFlag PathGenerator::GetNavTerrain(float x, float y, float z) const
|
||||
NavTerrain PathGenerator::GetNavTerrain(float x, float y, float z) const
|
||||
{
|
||||
LiquidData data;
|
||||
LiquidData const& liquidData = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), x, y, z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS);
|
||||
@@ -695,7 +691,7 @@ NavTerrainFlag PathGenerator::GetNavTerrain(float x, float y, float z) const
|
||||
return NAV_WATER;
|
||||
case MAP_LIQUID_TYPE_MAGMA:
|
||||
case MAP_LIQUID_TYPE_SLIME:
|
||||
return NAV_MAGMA_SLIME;
|
||||
return NAV_MAGMA;
|
||||
default:
|
||||
return NAV_GROUND;
|
||||
}
|
||||
@@ -1143,9 +1139,9 @@ bool PathGenerator::IsWaterPath(Movement::PointsArray pathPoints) const
|
||||
// Check both start and end points, if they're both in water, then we can *safely* let the creature move
|
||||
for (uint32 i = 0; i < pathPoints.size(); ++i)
|
||||
{
|
||||
NavTerrainFlag terrain = GetNavTerrain(pathPoints[i].x, pathPoints[i].y, pathPoints[i].z);
|
||||
NavTerrain terrain = GetNavTerrain(pathPoints[i].x, pathPoints[i].y, pathPoints[i].z);
|
||||
// One of the points is not in the water
|
||||
if (terrain != NAV_MAGMA_SLIME && terrain != NAV_WATER)
|
||||
if (terrain != NAV_MAGMA && terrain != NAV_WATER)
|
||||
{
|
||||
waterPath = false;
|
||||
break;
|
||||
|
||||
@@ -168,7 +168,7 @@ class PathGenerator
|
||||
void BuildPointPath(float const* startPoint, float const* endPoint);
|
||||
void BuildShortcut();
|
||||
|
||||
[[nodiscard]] NavTerrainFlag GetNavTerrain(float x, float y, float z) const;
|
||||
[[nodiscard]] NavTerrain GetNavTerrain(float x, float y, float z) const;
|
||||
void CreateFilter();
|
||||
void UpdateFilter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user