PDA

View Full Version : Fix for mob not always facing attacker


Derision
08-03-2008, 09:27 AM
Playing a necro, I've noticed a lot that if a mob is pursuing me, and my pet comes up behind it and engages, although the mob starts attacking my pet, it often doesn't turn to face it. I made this one line addition which seems to have done the trick:


--- /tmp/EQEmu-0.7.0-1119/zone/MobAI.cpp 2008-05-31 05:12:30.000000000 +0100
+++ MobAI.cpp 2008-08-03 14:13:40.000000000 +0100
@@ -605,20 +605,21 @@
if (is_combat_range)
{
if (AImovement_timer->Check())
{
SetRunAnimSpeed(0);
}
if(IsMoving())
{
SetMoving(false);
moved=false;
+ SetHeading(CalculateHeadingToTarget(target->GetX(), target->GetY()));
/*while(DistNoZ(*target)<10){ //dont want them too close
x_pos -= tar_vx*.2;
y_pos -= tar_vy*.2;
z_pos -= tar_vz*.2;
}*/
SendPosition();
tar_ndx =0;
}

//casting checked above...