Core/Movement: Use SetWalk(true/false) instead of AddUnit/RemoveUnit.
This commit is contained in:
1 parent
9219625243
commit
1cac01b3df
50 files changed
+131
-122
No files matched your search
@@ -45,7 +45,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
||||
mCanRepeatPath = false;
|
||||
|
||||
// spawn in run mode
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->SetWalk(false);
|
||||
mRun = false;
|
||||
|
||||
me->GetPosition(&mLastOOCPos);
|
||||
@@ -720,9 +720,9 @@ uint64 SmartAI::GetGUID(int32 /*id*/)
|
||||
void SmartAI::SetRun(bool run)
|
||||
{
|
||||
if (run)
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->SetWalk(false);
|
||||
else
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->SetWalk(true);
|
||||
|
||||
mRun = run;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user