mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
fix(Core/Movement): Add safeguards against root freezes (#23117)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "Unit.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Log.h"
|
||||
|
||||
namespace Movement
|
||||
{
|
||||
@@ -103,7 +104,13 @@ namespace Movement
|
||||
|
||||
bool isOrientationOnly = args.path.size() == 2 && args.path[0] == args.path[1];
|
||||
|
||||
if ((moveFlags & MOVEMENTFLAG_ROOT) || isOrientationOnly)
|
||||
if (moveFlags & MOVEMENTFLAG_ROOT) // This case should essentially never occur - hence the trace logging - hints to issues elsewhere
|
||||
{
|
||||
LOG_TRACE("movement", "Invalid movement during root. Entry: {} IsImmobilized {}, moveflags {}", unit->GetEntry(), unit->IsImmobilizedState() ? "true" : "false", moveFlags);
|
||||
moveFlags &= ~MOVEMENTFLAG_MASK_MOVING;
|
||||
}
|
||||
|
||||
if (isOrientationOnly)
|
||||
moveFlags &= ~MOVEMENTFLAG_MASK_MOVING;
|
||||
|
||||
if (!args.HasVelocity)
|
||||
|
||||
Reference in New Issue
Block a user