diff options
| author | Ovah <dreadkiller@gmx.de> | 2020-06-01 15:58:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 15:58:31 +0200 |
| commit | 43ef610fe059c3da4cc1ad2036f83cfa67ce0fee (patch) | |
| tree | c39d1b74bac244685a5a4de0b18ba968fa3c00d2 /src/server/game/Movement | |
| parent | 48c5c0d7a2424df73343df127d415ee18eb84296 (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
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 39ee09731a3..af6b8b0b30c 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -178,7 +178,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) @@ -232,7 +232,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) |
