mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/AI: merged walk / run fix for EscortAI
This commit is contained in:
@@ -353,10 +353,13 @@ void EscortAI::FillPointMovementListForCreature()
|
||||
|
||||
void EscortAI::SetRun(bool on)
|
||||
{
|
||||
if (on && !_running)
|
||||
me->SetWalk(false);
|
||||
else if (!on && _running)
|
||||
me->SetWalk(true);
|
||||
if (on == _running)
|
||||
return;
|
||||
|
||||
for (auto& node : _path.nodes)
|
||||
node.moveType = on ? WAYPOINT_MOVE_TYPE_RUN : WAYPOINT_MOVE_TYPE_WALK;
|
||||
|
||||
me->SetWalk(!on);
|
||||
|
||||
_running = on;
|
||||
}
|
||||
|
||||
@@ -799,8 +799,13 @@ ObjectGuid SmartAI::GetGUID(int32 /*id*/) const
|
||||
|
||||
void SmartAI::SetRun(bool run)
|
||||
{
|
||||
if (run == mRun)
|
||||
return;
|
||||
|
||||
me->SetWalk(!run);
|
||||
mRun = run;
|
||||
for (auto& node : _path.nodes)
|
||||
node.moveType = run ? WAYPOINT_MOVE_TYPE_RUN : WAYPOINT_MOVE_TYPE_WALK;
|
||||
}
|
||||
|
||||
void SmartAI::SetDisableGravity(bool fly)
|
||||
|
||||
Reference in New Issue
Block a user