Core-side part for recastnav upgrade:

Corrected values, fixed compile, re-extraction of Mmaps it's required again, mmaps will be updated on wiki.
This commit is contained in:
sucofog
2017-11-15 18:55:04 +01:00
committed by GitHub
parent 17802ab6e5
commit c75ec13191
15 changed files with 95 additions and 56 deletions

View File

@@ -5788,7 +5788,7 @@ SpellCastResult Spell::CheckCast(bool strict)
m_pathFinder = new PathGenerator(m_caster);
m_pathFinder->CalculatePath(pos.m_positionX, pos.m_positionY, pos.m_positionZ+0.15f, false);
G3D::Vector3 endPos = m_pathFinder->GetEndPosition(); // also check distance between target and the point calculated by mmaps
if (m_pathFinder->GetPathType()&PATHFIND_NOPATH || target->GetExactDistSq(endPos.x, endPos.y, endPos.z) > maxdist*maxdist || m_pathFinder->getPathLength() > (40.0f + (m_caster->HasAura(58097) ? 5.0f : 0.0f)))
if (m_pathFinder->GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE) || target->GetExactDistSq(endPos.x, endPos.y, endPos.z) > maxdist*maxdist || m_pathFinder->getPathLength() > (40.0f + (m_caster->HasAura(58097) ? 5.0f : 0.0f)))
return SPELL_FAILED_NOPATH;
}
break;