From 9bd4bbee5298ad315fcd5163d08808014cdce45d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 5 Sep 2011 11:47:48 +0900 Subject: [PATCH] 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. --- nq/source/sv_phys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nq/source/sv_phys.c b/nq/source/sv_phys.c index e65c8bc76..e95e3c714 100644 --- a/nq/source/sv_phys.c +++ b/nq/source/sv_phys.c @@ -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)