git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4951 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-05-20 19:41:26 +00:00
parent f5c80de15e
commit 91677d98e9
2 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -444,12 +444,15 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
pl->lastjump = lastmillis;
}
pl->timeinair = 0;
pl->crouchedinair = false;
}
else
{
pl->timeinair += curtime;
if (pl->trycrouch && !pl->crouching) pl->vel.z += 0.8f;
if (!pl->trycrouch && pl->crouching) pl->vel.z -= 0.8f;
if (pl->trycrouch && !pl->crouching && !pl->crouchedinair) {
pl->vel.z += 0.6f;
pl->crouchedinair = true;
}
}
}