diff --git a/src/Ai/Base/Actions/FollowActions.cpp b/src/Ai/Base/Actions/FollowActions.cpp index 12335e855..85b297b52 100644 --- a/src/Ai/Base/Actions/FollowActions.cpp +++ b/src/Ai/Base/Actions/FollowActions.cpp @@ -95,9 +95,8 @@ bool FollowAction::Execute(Event /*event*/) bool const movingAllowed = IsMovingAllowed(); bool const dupMove = IsDuplicateMove(destX, destY, destZ); - bool const waiting = IsWaitingForLastMove(priority); - if (movingAllowed && !dupMove && !waiting) + if (movingAllowed && !dupMove) { if (bot->IsSitState()) bot->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/src/Ai/Base/Actions/MovementActions.cpp b/src/Ai/Base/Actions/MovementActions.cpp index 791d8081a..ddc3723d1 100644 --- a/src/Ai/Base/Actions/MovementActions.cpp +++ b/src/Ai/Base/Actions/MovementActions.cpp @@ -215,9 +215,6 @@ bool MovementAction::JumpTo(uint32 mapId, float x, float y, float z, MovementPri if (IsDuplicateMove(x, y, z)) return false; - if (IsWaitingForLastMove(priority)) - return false; - float speed = bot->GetSpeed(MOVE_RUN); MotionMaster& mm = *bot->GetMotionMaster(); mm.Clear(); @@ -325,10 +322,6 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, { return false; } - if (IsWaitingForLastMove(priority)) - { - return false; - } bool generatePath = !bot->IsFlying() && !bot->isSwimming(); bool disableMoveSplinePath = @@ -1053,27 +1046,6 @@ bool MovementAction::IsDuplicateMove(float x, float y, float z) return true; } -bool MovementAction::IsWaitingForLastMove(MovementPriority priority) -{ - LastMovement& lastMove = *context->GetValue("last movement"); - - if (priority > lastMove.priority) - return false; - - // Stale delay bypass: if the bot has actually stopped moving (spline - // finalized + no movement flags), the delay is meaningless — common - // after combat ends with MOVEMENT_COMBAT priority still recorded, - // which would otherwise silently gate every non-combat MoveFarTo / - // MoveRandomNear request until the leftover delay expires. - if (bot->movespline->Finalized() && !bot->isMoving()) - return false; - - if (lastMove.lastdelayTime + lastMove.msTime > getMSTime()) - return true; - - return false; -} - bool MovementAction::IsMovingAllowed() { return botAI->CanMove(); diff --git a/src/Ai/Base/Actions/MovementActions.h b/src/Ai/Base/Actions/MovementActions.h index 02c5501bb..5a2ba84f2 100644 --- a/src/Ai/Base/Actions/MovementActions.h +++ b/src/Ai/Base/Actions/MovementActions.h @@ -72,7 +72,6 @@ protected: void SetNextMovementDelay(float delayMillis); bool IsMovingAllowed(WorldObject* target); bool IsDuplicateMove(float x, float y, float z); - bool IsWaitingForLastMove(MovementPriority priority); bool IsMovingAllowed(); bool Flee(Unit* target); void ClearIdleState(); diff --git a/src/Ai/Raid/Uld/UldActions.cpp b/src/Ai/Raid/Uld/UldActions.cpp index 1ea211949..5f999a5f9 100644 --- a/src/Ai/Raid/Uld/UldActions.cpp +++ b/src/Ai/Raid/Uld/UldActions.cpp @@ -1462,15 +1462,6 @@ bool HodirBitingColdJumpAction::Execute(Event /*event*/) // float speed = 7.96f; // UpdateMovementState(); - // if (!IsMovingAllowed(mapId, x, y, z)) - //{ - // return false; - // } - // MovementPriority priority; - // if (IsWaitingForLastMove(priority)) - //{ - // return false; - // } // MotionMaster& mm = *bot->GetMotionMaster(); // mm.Clear(); diff --git a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp index 153d99e9d..88fbcfab4 100644 --- a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp +++ b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp @@ -50,10 +50,6 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest) if (dest == WorldPosition()) return false; - // performance optimization - if (IsWaitingForLastMove(MovementPriority::MOVEMENT_NORMAL)) - return false; - // Already-at-dest short-stop. Below targetPosRecalcDistance the // move is effectively done — stop any active spline and clear // the cached path if it pointed here, so we don't keep gliding. @@ -473,9 +469,6 @@ bool NewRpgBaseAction::MoveWorldObjectTo(ObjectGuid guid, float distance) bool NewRpgBaseAction::MoveRandomNear(float moveStep, MovementPriority priority, WorldObject* center) { - if (IsWaitingForLastMove(priority)) - return false; - float const distance = (0.4f + rand_norm() * 0.6f) * moveStep; float const angle = (float)rand_norm() * 2 * static_cast(M_PI); float const dx = bot->GetPositionX() + distance * cos(angle); diff --git a/src/Ai/World/Rpg/Action/NewRpgOutdoorPvP.cpp b/src/Ai/World/Rpg/Action/NewRpgOutdoorPvP.cpp index 042246cfb..e063adb02 100644 --- a/src/Ai/World/Rpg/Action/NewRpgOutdoorPvP.cpp +++ b/src/Ai/World/Rpg/Action/NewRpgOutdoorPvP.cpp @@ -9,7 +9,7 @@ bool NewRpgOutdoorPvpAction::Execute(Event event) botAI->rpgInfo.ChangeToIdle(); return false; } - if (IsWaitingForLastMove(MovementPriority::MOVEMENT_NORMAL) || !bot->IsOutdoorPvPActive()) + if (!bot->IsOutdoorPvPActive()) return false; uint32 zoneId = bot->GetZoneId(); @@ -113,9 +113,6 @@ OPvPCapturePoint* NewRpgOutdoorPvpAction::SelectNewObjective(OutdoorPvP::OPvPCap bool NewRpgOutdoorPvpAction::PatrolCapturePoint(GameObject* objectiveGO, float radius) { - if (IsWaitingForLastMove(MovementPriority::MOVEMENT_NORMAL)) - return false; - // Randomly pause at the current spot before picking a new patrol point if (urand(0, 2) == 0) return ForceToWait(urand(3000, 6000));