removing some lag artifact

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5295 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-07-06 21:07:26 +00:00
parent c27a4e699c
commit f6572dd408
+4 -4
View File
@@ -172,14 +172,14 @@ void parsepositions(ucharbuf &p)
loopi(3)
{
float dr = o.v[i] - d->o.v[i];
if ( fabs(d->vel.v[i]) > 0.1 )
d->vel.v[i] = (i == 2 ? ( dr + d->eyeheight > 0 ? ( dr + d->eyeheight ) * 5 : 0 ) : dr ) * 0.1 + d->vel.v[i] * 0.9;
if ( fabs(d->vel.v[i]) > 0.25f )
d->vel.v[i] = (i == 2 ? ( dr + d->eyeheight > 0.0f ? ( dr + d->eyeheight ) * 5.0f : 0.0f ) : dr ) * 0.1f + d->vel.v[i] * 0.9f;
else
d->vel.v[i] = (i == 2 ? ( dr + d->eyeheight > 0 ? ( dr + d->eyeheight ) * 5 : 0 ) : dr ) * 0.6 + d->vel.v[i] * 0.4;
d->vel.v[i] = (i == 2 ? ( dr + d->eyeheight > 0.0f ? ( dr + d->eyeheight ) * 5.0f : 0.0f ) : dr ) * 0.3f + d->vel.v[i] * 0.7f;
}
}
else loopi(3) d->vel.v[i] = 0.0f;
d->last_pos = totalmillis + 400;
d->last_pos = totalmillis + 200;
}
// printf("->>>>>> R %d %f %f %f %f %f %f\n",cn,vel.x,vel.y,vel.z,d->vel.x,d->vel.y,d->vel.z);
d->o = o;