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
  #1  
Old 05-16-2002, 06:57 PM
beric
Fire Beetle
 
Join Date: Apr 2002
Posts: 4
Default npc movement

I've been playing around with the code for npc movement and position updates. Trying to get it as close to EQ live as possible so the mobs don't jump around while chasing me. Here's what I have done:

In NPC::Process(), I changed the line

"#define NPC_MOVEMENT_PER_TIC 400"
to
"int NPC_MOVEMENT_PER_TIC = GetRunSpeed();"

and changed the line
"appearance = 5;"
to
"appearance = NPC_MOVEMENT_PER_TIC+1;"

Then I inserted into mob.h
"float GetRunSpeed() { return runspeed; }"
just under "float GetSize()..."

and finally I set all mobs' runspeed to 12(seemed like a good number). In mysql typed:
use eq
update npc_types set runspeed=12;


Doing this seemed to make the mobs jump around a lot less.

In the SpawnPositionUpdate_Struct, anim_type seems to control the velocity of the mob on the client. Delta_x and delta_y don't appear to do anything. And I couldn't figure out exactly how to make the mobs do the run animation instead of the walk. The only way I could get them to look like they are running is to set their runspeed up to at least 61 which makes them way too fast.
If anyone knows what I'm doing wrong, please post.

Not sure if anybody knows or cares about any of this but figured I'd post it anyway. Just a newbie tryin to help out, or maybe get some help.
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:14 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3