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:
kaelima
2012-05-19 13:04:58 +02:00
parent fc0950dbf3
commit c3287fee06
4 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -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;
}