Core/Units: CanFly and CanHover will now return positive results when the creature has the according movement flags dispite not having the template movement field set as enabled. This fixes several edge cases with manually enabled flight movement
* renamed IsLevitating to IsGravityDisabled for consistency
This commit is contained in:
1 parent
4a25282f51
commit
813b82efa3
5 files changed
+9
-9
No files matched your search
@@ -180,7 +180,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)
|
||||
@@ -234,7 +234,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
|
||||
TC_LOG_DEBUG("maps.mmaps", "++ BuildPolyPath :: flying case");
|
||||
if (const Unit* _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)
|
||||
|
||||
Reference in new issue
Block a user