Fix: prevent MoveSplineInitArgs::Validate velocity asserts (velocity > 0.01f) for bots, pets, and charmed units (#1534)

* MoveSplineInitArgs::Validate: expression 'velocity > 0.01f' failed for GUID Full

* Update BotMovementUtils.h
This commit is contained in:
Alex Dcnh
2025-08-12 01:53:48 +02:00
committed by GitHub
parent c6b0424c29
commit 4e3ac609bd
6 changed files with 111 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
#include "RaidNaxxStrategy.h"
#include "ScriptedCreature.h"
#include "SharedDefines.h"
#include "BotMovementUtils.h"
bool GrobbulusGoBehindAction::Execute(Event event)
{
@@ -258,11 +259,26 @@ bool RazuviousUseObedienceCrystalAction::Execute(Event event)
return false;
}
if (charm->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == NULL_MOTION_TYPE)
{
/*{
charm->GetMotionMaster()->Clear();
charm->GetMotionMaster()->MoveChase(target);
charm->GetAI()->AttackStart(target);
}*/
// [Fix: MoveSplineInitArgs::Validate: expression 'velocity > 0.01f' failed for GUID Full:]
{
if (CanStartMoveSpline(charm))
{
charm->GetMotionMaster()->Clear();
charm->GetMotionMaster()->MoveChase(target);
}
else
{
charm->StopMoving();
}
charm->GetAI()->AttackStart(target);
}
// End Fix
Aura* forceObedience = botAI->GetAura("force obedience", charm);
uint32 duration_time;
if (!forceObedience)