diff options
| author | Ovah <dreadkiller@gmx.de> | 2020-06-01 15:58:31 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-01-06 19:46:41 +0100 |
| commit | 294657f7dd4d2db1ca6dcf66f0b0895c6ba92949 (patch) | |
| tree | 398d4fa0bbbd1c62bcc02df6fa3366b09186eadf /src/server/game/Movement | |
| parent | 5af8373cce498c14c7ee42066efde30c41a3e934 (diff) | |
Core/Units: flight and hover checks will now consider movement template data as well as manually set flight states
- manually set flight states via auras and scripts will no longer be ignored
- restored movement template consideration when generating pathings
- renamed IsLevitating to IsGravityDisabled to reflect the referenced movement flag's name
(cherry picked from commit 43ef610fe059c3da4cc1ad2036f83cfa67ce0fee)
Diffstat (limited to 'src/server/game/Movement')
| -rw-r--r-- | src/server/game/Movement/PathGenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index a4b15baadb3..3d2e6de024e 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -179,7 +179,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con { TC_LOG_DEBUG("maps.mmaps", "++ BuildPolyPath :: (startPoly == 0 || endPoly == 0)"); BuildShortcut(); - bool path = _source->GetTypeId() == TYPEID_UNIT && _source->ToCreature()->IsFlying(); + bool path = _source->GetTypeId() == TYPEID_UNIT && _source->ToCreature()->CanFly(); bool waterPath = _source->GetTypeId() == TYPEID_UNIT && _source->ToCreature()->CanSwim(); if (waterPath) @@ -233,7 +233,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con TC_LOG_DEBUG("maps.mmaps", "++ BuildPolyPath :: flying case"); if (Unit const* _sourceUnit = _source->ToUnit()) { - if (_sourceUnit->IsFlying()) + if (_sourceUnit->CanFly()) buildShotrcut = true; // Allow to build a shortcut if the unit is falling and it's trying to move downwards towards a target (i.e. charging) else if (_sourceUnit->IsFalling() && endPos.z < startPos.z) |
