Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-12-2004, 02:54 PM
Doodman's Avatar
Doodman
Developer
 
Join Date: Aug 2003
Posts: 246
Default Re: Fix for "jumpy" mobs and pets - Updated

One note:

Code:
...
...
      ratio = (speed/target_distance);

   	  if(target_distance >= speed)  // If we need to go father than we can in one cycle... 
      { 
         x_pos += tar_vx * ratio;
         y_pos += tar_vy * ratio;
		 if(tar_vz>2)
			z_pos += tar_vz * ratio;
		 else
			z_pos = z;
      } 
      else //If we are with-in our one cycle distance... 
      { 
         x_pos = x; 
         y_pos = y; 
         z_pos = z;  
      } 
...
...
Should be:
Code:
...
...
   	  if(target_distance >= speed)  // If we need to go father than we can in one cycle... 
      { 
         ratio = (speed/target_distance);

         x_pos += tar_vx * ratio;
         y_pos += tar_vy * ratio;
		 if(tar_vz>2)
			z_pos += tar_vz * ratio;
		 else
			z_pos = z;
      } 
      else //If we are with-in our one cycle distance... 
      { 
         x_pos = x; 
         y_pos = y; 
         z_pos = z;  
      } 
...
...
Since ratio is only used in there, no point in wasting cycles on the division.
Reply With Quote
 


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 06:05 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