From a5b4d0c53976119d561924143a465c9ab38ca8a8 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 23 Feb 2020 22:07:40 +0100 Subject: Core/Movement: Add support to cyclic splines to GenericMovementGenerator GenericMovementGenerator sets the _duration to the return value of spline.Launch(). For cyclic splines, this is the duration of 1 single cycle, while the spline itself never ends. To support this edge case in GenericMovementGenerator we just never update the _duration timer for cyclic splines. (cherry picked from commit 7a57029d8fd46c0966eb32b17019291785e61f37) --- .../scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 2422be16ec5..20ef0952791 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -1168,18 +1168,6 @@ class npc_ominous_cloud : public CreatureScript me->GetMotionMaster()->MoveCirclePath(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY(), me->GetPositionZ() + 5.0f, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), clockwise, 16); } - void MovementInform(uint32 type, uint32 /*id*/) override - { - if (type != EFFECT_MOTION_TYPE) - return; - - /* MoveCirclePath() add a GenericMovementGenerator that doesn't handle cyclic splines, handling only 1 round of the circle. - * This means we have to reschedule another MoveCirclePath() every time the previous one ends. - * Remove this code once GenericMovementGenerator properly handles cyclic splines. - */ - me->GetMotionMaster()->MoveCirclePath(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY(), me->GetPositionZ() + 5.0f, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), clockwise, 16); - } - bool clockwise = false; }; -- cgit v1.2.3