Make sure tossed entities with upward velocity can always move.

If a tossed entity has ONGROUND set, it won't move, but if it has an upward
velocity, it can't possibly be ONGROUND, so clear the flag if the entity is
moving upwards.
This commit is contained in:
Bill Currie 2011-09-05 11:47:48 +09:00
parent 937ea854d6
commit 9bd4bbee52

View file

@ -673,6 +673,9 @@ SV_Physics_Toss (edict_t *ent)
if (!SV_RunThink (ent))
return;
if (SVvector (ent, velocity)[2] > 0)
SVfloat (ent, flags) = (int) SVfloat (ent, flags) & ~FL_ONGROUND;
// if onground, return without moving
if (((int) SVfloat (ent, flags) & FL_ONGROUND))
return;
@ -729,6 +732,7 @@ SV_Physics_Toss (edict_t *ent)
This is also used for objects that have become still on the ground, but
will fall if the floor is pulled out from under them.
FIXME: is this true?
*/
static void
SV_Physics_Step (edict_t *ent)