diff options
author | tkrokli <tkrokli@users.noreply.github.com> | 2017-03-26 18:09:46 +0200 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2020-04-24 17:18:50 +0200 |
commit | a0feff65bec4e7583e281afe7f82cf1a8c77de68 (patch) | |
tree | 5e6b465002708745e8b8cd2c2dfb53743ad8c54e | |
parent | 7be8b9cb7dc7b9827ebdc57b4c55830cd745740f (diff) |
Game/AI: SMART_ACTION_JUMP_TO_POS should resume path when reached jump location (#19029)
SmartAI NPCs using SMART_ACTION_JUMP_TO_POS
should resume their path when they have reached the jump location.
The changes in this PR makes the action work as intended.
Closes #18760
(cherry picked from commit 6e08051825d3d05ea2bccbe43c0823a40ee08057)
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp | 2 |
2 files changed, 0 insertions, 6 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 8bee4794975..6224533846e 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2341,12 +2341,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { if (Creature* creature = (*itr)->ToCreature()) - { - creature->GetMotionMaster()->Clear(); creature->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, 0.0f, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); // @todo add optional jump orientation support? - } } - /// @todo Resume path when reached jump location delete targets; break; diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index 6f3b34c0e4f..3cf0711dc41 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -149,8 +149,6 @@ void EffectMovementGenerator::Finalize(Unit* unit) { if (Unit* victim = unit->GetVictim()) unit->GetMotionMaster()->MoveChase(victim); - else - unit->GetMotionMaster()->Initialize(); } if (unit->ToCreature()->AI()) |