send foot position over network instead of eye position for better eyeheight handling
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3004 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -85,6 +85,7 @@ void parsepositions(ucharbuf &p)
|
||||
vec oldpos(d->o);
|
||||
float oldyaw = d->yaw, oldpitch = d->pitch;
|
||||
d->o = o;
|
||||
d->o.z += d->eyeheight;
|
||||
d->yaw = yaw;
|
||||
d->pitch = pitch;
|
||||
d->roll = roll;
|
||||
@@ -109,11 +110,13 @@ void parsepositions(ucharbuf &p)
|
||||
else if(smoothmove && d->smoothmillis>=0 && oldpos.dist(d->o) < smoothdist)
|
||||
{
|
||||
d->newpos = d->o;
|
||||
d->newpos.z -= d->eyeheight;
|
||||
d->newyaw = d->yaw;
|
||||
d->newpitch = d->pitch;
|
||||
d->o = oldpos;
|
||||
d->yaw = oldyaw;
|
||||
d->pitch = oldpitch;
|
||||
oldpos.z -= d->eyeheight;
|
||||
(d->deltapos = oldpos).sub(d->newpos);
|
||||
d->deltayaw = oldyaw - d->newyaw;
|
||||
if(d->deltayaw > 180) d->deltayaw -= 360;
|
||||
|
||||
Reference in New Issue
Block a user