mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
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:
parent
937ea854d6
commit
9bd4bbee52
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue