From c43bbfc522269b24f65d35f872d73a00a02d8395 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Sat, 16 Mar 2002 14:46:57 +0000 Subject: [PATCH] don't do down traces if sitting on the floor of world (world never moves, so we can skip it), restores a lot of the speed lost in recent commits git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1656 d7cf8633-e32d-0410-b094-e92efae38249 --- sv_phys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sv_phys.c b/sv_phys.c index b8297dd8..09ec4653 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -1249,6 +1249,8 @@ void SV_Physics_Toss (edict_t *ent) return; // if onground, return without moving + if (((int)ent->v.flags & FL_ONGROUND) && ent->v.groundentity == 0) + return; /* if ( ((int)ent->v.flags & FL_ONGROUND) ) { @@ -1352,6 +1354,8 @@ void SV_Physics_Step (edict_t *ent) else if ((flags & FL_SWIM) && SV_PointContents(ent->v.origin) != CONTENTS_EMPTY) fall = false; } + if (fall && (flags & FL_ONGROUND) && ent->v.groundentity == 0) + fall = false; if (fall) { -- 2.39.2