crouching

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1419 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-11-11 14:20:52 +00:00
parent 9d74fda65d
commit eb81f05ec9
14 changed files with 56 additions and 46 deletions
+3 -1
View File
@@ -29,7 +29,7 @@ void updatepos(playerent *d)
const float dx = player1->o.x-d->o.x;
const float dy = player1->o.y-d->o.y;
const float dz = player1->o.z-d->o.z;
const float rz = player1->aboveeye+d->eyeheight;
const float rz = player1->aboveeye+d->dyneyeheight();
const float fx = (float)fabs(dx), fy = (float)fabs(dy), fz = (float)fabs(dz);
if(fx<r && fy<r && fz<rz && d->state!=CS_DEAD)
{
@@ -84,6 +84,8 @@ void parsepositions(ucharbuf &p)
d->onfloor = f&1;
f >>= 1;
d->onladder = f&1;
f >>= 2;
d->crouching = f&1;
updatepos(d);
updatelagtime(d);
if(d->state==CS_LAGGED || d->state==CS_SPAWNING) d->state = CS_ALIVE;