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

@@ -57,6 +57,7 @@
#include "Unit.h"
#include "UpdateTime.h"
#include "Vehicle.h"
#include "BotMovementUtils.h"
const int SPELL_TITAN_GRIP = 49152;
@@ -6325,11 +6326,27 @@ void PlayerbotAI::PetFollow()
if (!pet)
return;
pet->AttackStop();
pet->InterruptNonMeleeSpells(false);
/* pet->InterruptNonMeleeSpells(false);
pet->ClearInPetCombat();
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
if (pet->ToPet())
pet->ToPet()->ClearCastWhenWillAvailable();*/
// [Fix: MoveSplineInitArgs::Validate: expression 'velocity > 0.01f' failed for GUID Full:]
pet->InterruptNonMeleeSpells(false);
pet->ClearInPetCombat();
if (CanStartMoveSpline(pet))
{
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
}
else
{
pet->StopMovingOnCurrentPos(); // on nenvoie pas dordre invalide
}
if (pet->ToPet())
pet->ToPet()->ClearCastWhenWillAvailable();
//End Fix
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
return;