]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
MOVETYPE_BOUNCE change: an explosion above gibs will now cause them to bounce into...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Feb 2004 18:41:19 +0000 (18:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Feb 2004 18:41:19 +0000 (18:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3925 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index 62b1ff62ac55bb3a517cb3bfd30da68588a77468..66eec8e2fe1fdd61094b74ff6597af0842b40d99 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1288,9 +1288,11 @@ void SV_Physics_Toss (edict_t *ent)
                }
                else if (ent->v->movetype == MOVETYPE_BOUNCE)
                {
+                       float d;
                        ClipVelocity (ent->v->velocity, trace.plane.normal, ent->v->velocity, 1.5);
                        // LordHavoc: fixed grenades not bouncing when fired down a slope
-                       if (trace.plane.normal[2] > 0.7 && DotProduct(trace.plane.normal, ent->v->velocity) < 60)
+                       d = DotProduct(trace.plane.normal, ent->v->velocity);
+                       if (trace.plane.normal[2] > 0.7 && fabs(d) < 60)
                        {
                                ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
                                ent->v->groundentity = EDICT_TO_PROG(trace.ent);