diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-02-24 21:01:50 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-02-24 21:01:50 +0100 |
| commit | 272009ebeed80bc7749c004348fb1057761cf268 (patch) | |
| tree | adc8428150e2a2276bbe8c07a75934921086e197 /src/server/game/Spells/Spell.cpp | |
| parent | a5d860c4fa92b61f65a8dad56706f8a07d88faad (diff) | |
Core/MMAPs: Add support for raycast
Add an optional parameter "straightLine" to PathGenerator::CalculatePath() which will use raycast instead of path finding and will return only complete path from start to end position.
Implement this new type of path in SPELL_EFFECT_CHARGE , fixing strange behaviors when using Charge with mmaps enabled.
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index bf6f95d8c92..8b88ec9af92 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5000,7 +5000,7 @@ SpellCastResult Spell::CheckCast(bool strict) target->GetFirstCollisionPosition(pos, CONTACT_DISTANCE, target->GetRelativeAngle(m_caster)); m_preGeneratedPath.SetPathLengthLimit(m_spellInfo->GetMaxRange(true) * 1.5f); - bool result = m_preGeneratedPath.CalculatePath(pos.m_positionX, pos.m_positionY, pos.m_positionZ + target->GetObjectSize()); + bool result = m_preGeneratedPath.CalculatePath(pos.m_positionX, pos.m_positionY, pos.m_positionZ + target->GetObjectSize(), false, true); if (m_preGeneratedPath.GetPathType() & PATHFIND_SHORT) return SPELL_FAILED_OUT_OF_RANGE; else if (!result || m_preGeneratedPath.GetPathType() & PATHFIND_NOPATH) |
