Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2008, 09:27 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default Fix for mob not always facing attacker

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:

Code:
--- /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...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:36 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3