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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2008, 06:39 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default BestZ Calculation for aggroed mobs, pet follow and mobs pathing back to spawn point

At the moment, when CalculateNewPosition2 is called for:

Pet's following their master
Aggroed mobs pursuing a player
Mobs pathing back to their spawn point (because player is FD/Dead/Zoned)

it is called with the checkZ parameter omitted. This defaults to false, and therefore mobs/pets can 'bounce' or disappear under the world in these situations, particularly over uneven ground
(I performed my tests in nektulos, eastkarana, and commons).

In mob.h, around line 736 or so, find:
Code:
bool CalculateNewPosition2(float x, float y, float z, float speed, bool checkZ = false);
and change it to:
Code:
bool CalculateNewPosition2(float x, float y, float z, float speed, bool checkZ = true);
Note that there is both a CalculateNewPosition and CalculateNewPosition2 function. You can ignore the first one as it is no longer used.

In my testing this morning, this seems to work well in the scenarios I listed above. (It won't stop all occurrences of mobs disappearing under the world, as there are other reasons that happens).

Of course, the extra Z checks will add some extra CPU overhead, so anyone running a populated server should keep an eye on that if they make this change.
Reply With Quote
  #2  
Old 08-03-2008, 08:31 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

First thing that came to mind was the Orc Lift in GFay - I always seemed to have problems getting trains (I unfortunately made myself) to the guards there. Once I got aggro, couldn't go back because they would pop out of nowhere and be all over me again.
Well, this fixed that: with out the fix, I made a big train of around 10, they would occasionally come from inside the hill just in front of the Orc lift (others never came, until I went up the hill again).
With your fix, I made roughly the same train , now they all run over the hill to the orc lift, no delays.
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:06 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3