PDA

View Full Version : npc heading and movement


Turath
02-24-2004, 01:36 PM
hey, made my over here now

I know lotta places is said no support on 5.5, but figure pointing out problems is ok since it needs to be fixed anyway right?

well anyway all npc's face north, didn't have this problem last time I used eqemu was build 5.0 or something still using my same database I fixed it all up made it current, all headings are set for each spawn all the same as it used to be and worked then.

so yeah they always face northing unless they are moving, but as soon as they stop at a waypoint they pop north facing again no matter which way they were walking, every few second while they walk too they like bounce a bit, or sometimes walk in a circle then pop again a bit, am guessing these pops are client updates, well, am thinking could this be because they are being forced to face north?

could they be doing those little ghosting circle things cause the server tried to point them north while they are walking and they do that little circle then pop ahead? or do those little bounces when they walk cause they are trying to be told to face a diffrent heading than they are walking?

I notice movement is a whole heck of alot better than it used to be, they stick on the ground alot better no more walking in the air, but still these little pops at times, and am wondering if this could be it?

or is it just me and did the way heading is stored for spawns change? though I went through and looked at everything between my database and the new structure and fixed and added anything that was needed and saw nothing with spawns that had changed, just npc type which wouldn't have anything to do with heading

btw I am using 5.5 dr1 the newest one from shawns site as of feb 22nd I think the date was?

used my own compiles only changing the max npc types from 200k to 600k

killspree
02-24-2004, 07:48 PM
That is a problem I tracked down to the npc heading being divided by 8 in the code for SpawnNPC() - maybe it was the method of finding the correct heading originally? Now it seems NPCs use the same heading as the client does for players, so maybe that was just overlooked when code was changed. I've been away for a while, so I haven't kept up-to-date with changes.

Wumpas
02-25-2004, 12:26 AM
That is a problem I tracked down to the npc heading being divided by 8 in the code for SpawnNPC() - maybe it was the method of finding the correct heading originally? Now it seems NPCs use the same heading as the client does for players, so maybe that was just overlooked when code was changed. I've been away for a while, so I haven't kept up-to-date with changes.



LOL whare the hell were you months ago skorpious2k has been trying to track that bug down for along time I too have even done some code spelunking. I will try messing with that value and see what it does however so you know scorpous thinks that it is attributed to bad packet data. I don't know who is right it may be both :D Im glad someone else took intrest in this glitch it will make the eqemu seem more like live ! :D

I have been working with scorp to get boats working and was so erked by that bug every time a boat stoped at a dock it would pop to a strange direction (I wont say it was north because I didn't check to see if that was a constant in all zones) I took my year and a half of qbasic experiance and bough Barns and Nobel out of c++ books :lol: Since then i've been racking my brain in total seclusion trying to learn a language that is still out of my league for a bug someone just might of had a solution too all this time :D
lol

Monrezz
02-25-2004, 06:10 AM
Wait until he tells you how long it took him to track it down and fix it :P

sandy
02-26-2004, 03:50 PM
for spawns in my eqbuilder, i use ( heading * 4 ) where heading is the eqlive heading value
and this works well

Turath
02-26-2004, 05:59 PM
yeah, I noticed mobs were facing the directions other than just north when I sourced in one of the sql's made by your program last night, looked all right to me

wonder why the old heading values don't work though /shrug

Windcatcher
02-27-2004, 05:23 PM
This is the fix I had to make to my copy of 0.5.3-DR3:

void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
strcpy(ns->spawn.name, name);
if(IsClient())
strncpy(ns->spawn.last_name,lastname,32);
ns->spawn.heading = FloatToEQ19(heading);//heading;

Note the last line. It used to simply assign heading, but it should really be in fixed-point format. This sort of fix probably needs to be done elsewhere in mob.cpp as well, but I don't know where.

Wind