From: havoc Date: Sun, 22 Apr 2007 09:02:23 +0000 (+0000) Subject: fixed bug where items would not fall if pushed off a ledge by a X-Git-Tag: xonotic-v0.1.0preview~3285 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eebda8182de07cc69252cba0c7ee8e327102ec41;p=xonotic%2Fdarkplaces.git fixed bug where items would not fall if pushed off a ledge by a MOVETYPE_PUSH entity git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7150 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_phys.c b/sv_phys.c index 60ab8f24..2948f2c9 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -1191,9 +1191,10 @@ void SV_PushMove (prvm_edict_t *pusher, float movetime) pusher->fields.server->solid = savesolid; // was SOLID_BSP //Con_Printf("%s:%d frac %f startsolid %d bmodelstartsolid %d allsolid %d\n", __FILE__, __LINE__, trace.fraction, trace.startsolid, trace.bmodelstartsolid, trace.allsolid); - // this check is for items riding platforms that are passing under (or - // through) walls intended to knock the items off - if (trace.fraction < 1 && check->fields.server->movetype != MOVETYPE_WALK) + // this trace.fraction < 1 check causes items to fall off of pushers + // if they pass under or through a wall + // the groundentity check causes items to fall off of ledges + if (check->fields.server->movetype != MOVETYPE_WALK && (trace.fraction < 1 || PRVM_PROG_TO_EDICT(check->fields.server->groundentity) != pusher)) check->fields.server->flags = (int)check->fields.server->flags & ~FL_ONGROUND; // if it is still inside the pusher, block