mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 06:29:50 -04:00
Core/SmartAI:
- Improve an error msg in ProcessAction - Allow dist/angle to be 0.0f and set default if negative when using SMART_ACTION_FOLLOW - Some minor cleanup in Opcodes.cpp, all smsg's should have Handle_ServerSide
This commit is contained in:
@@ -804,12 +804,12 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
|
||||
return;
|
||||
SetRun(mRun);
|
||||
mFollowGuid = target->GetGUID();
|
||||
mFollowDist = dist ? dist : PET_FOLLOW_DIST;
|
||||
mFollowAngle = angle ? angle : me->GetFollowAngle();
|
||||
mFollowDist = dist >= 0.0f ? dist : PET_FOLLOW_DIST;
|
||||
mFollowAngle = angle >= 0.0f ? angle : me->GetFollowAngle();
|
||||
mFollowArrivedTimer = 1000;
|
||||
mFollowCredit = credit;
|
||||
mFollowArrivedEntry = end;
|
||||
me->GetMotionMaster()->MoveFollow(target, dist, angle);
|
||||
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
|
||||
mFollowCreditType = creditType;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user