aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRothend <67004168+Rothend@users.noreply.github.com>2020-06-24 21:32:21 +0200
committerGitHub <noreply@github.com>2020-06-24 21:32:21 +0200
commit37cb39179629c90afb09324864bd31bddb9bd07c (patch)
tree6417bde4078119e5aeb8b1d50da02037be18cf02
parent5339d1d3b835fcc8f635d34457ceb6e653e70a1c (diff)
Core/SAI: do not allow the waypoint pause timer to update while in combat. (#24877)
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 01d97a5c130..b8f532ecd39 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -938,13 +938,13 @@ void SmartAI::UpdatePath(uint32 diff)
// handle pause
if (HasEscortState(SMART_ESCORT_PAUSED) && (_waypointReached || _waypointPauseForced))
{
- if (_waypointPauseTimer <= diff)
+ if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING))
{
- if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING))
+ if (_waypointPauseTimer <= diff)
ResumePath();
+ else
+ _waypointPauseTimer -= diff;
}
- else
- _waypointPauseTimer -= diff;
}
else if (_waypointPathEnded) // end path
{