fixed crouch lock-in and being stuck on stairs

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1460 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-15 17:15:36 +00:00
parent e83a2e6eac
commit 259c4d48cf
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -195,7 +195,7 @@ bool collide(physent *d, bool spawn, float drop, float rise)
{
d->o.z = lo+d->dyneyeheight(); // stick on step
}
else if(spacelo>-1.26f && d->type!=ENT_BOUNCE) d->o.z += rise; // rise thru stair
else if(spacelo>-1.26f && d->type!=ENT_BOUNCE && !d->crouching) d->o.z += rise; // rise thru stair
else return false;
}
else
@@ -497,7 +497,7 @@ void jumpn(bool on)
void crouch(bool on)
{
if(intermission || player1->onladder || !player1->onfloor) return;
if(intermission || player1->onladder || (on && !player1->onfloor && player1->timeinair > 50)) return;
player1->crouching = on;
}