diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2020-06-17 20:20:26 +0000 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-01-04 20:44:02 +0100 |
| commit | d58d0e895c6e22bcf40be5c38ff828c98a7600e6 (patch) | |
| tree | 5c628e1a49f9884934d24ab884896cfaa9f18471 /src/server | |
| parent | bafd22104cd7b12056e2ea3060ddc778375ae60c (diff) | |
Handle different slopes in mmaps (#24765)
* Tools/MMAPs: Remove input argument --maxAngle
Remove input argument --maxAngle . This should be just hardcoded in MapBuilder::GetMapSpecificConfig() so all settings are easily found in the same place instead of being spread around.
* Tools/MMAPs: Add new area type NAV_AREA_GROUND_STEEP
Add new area type NAV_AREA_GROUND_STEEP for ground with slope in the range (55, 70] .
NAV_AREA_GROUND is used for ground with range [0, 55] .
NAV_AREA_GROUND_STEEP takes priority over NAV_AREA_GROUND.
* Tools/MMAPs: Fix NAV_GROUND_STEEP flag not being saved in the mmtile
* Core/PathFinding: Implement NAV_GROUND_STEEP flag
Implement NAV_GROUND_STEEP flag, used only by Creatures that are in combat or evading.
* Distinguish between RC_WALKABLE_AREA and NAV_AREA_GROUND.
* Allow mobs in combat to walk on steeps up to 80°
* Allow mobs in combat to walk on steeps up to 85°.
Disable rcFilterLedgeSpans() filter as it removed long steep spans.
* Increase cost of steep spans to try making creatures walk around obstacles instead of walking on them
* Revert last commit
(cherry picked from commit 995a443da219ec773febd7dd29d18f3cefaa1f3b)
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/game/Movement/PathGenerator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index 0effe2a5d87..a4b15baadb3 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -679,6 +679,7 @@ void PathGenerator::UpdateFilter() // allow creatures to cheat and use different movement types if they are moved // forcefully into terrain they can't normally move in if (Unit const* _sourceUnit = _source->ToUnit()) + { if (_sourceUnit->IsInWater() || _sourceUnit->IsUnderWater()) { uint16 includedFlags = _filter.getIncludeFlags(); @@ -688,6 +689,11 @@ void PathGenerator::UpdateFilter() _filter.setIncludeFlags(includedFlags); } + + if (Creature const* _sourceCreature = _source->ToCreature()) + if (_sourceCreature->IsInCombat() || _sourceCreature->IsInEvadeMode()) + _filter.setIncludeFlags(_filter.getIncludeFlags() | NAV_GROUND_STEEP); + } } NavTerrainFlag PathGenerator::GetNavTerrain(float x, float y, float z) |
