]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
cl_collision: don't hit network entities of players who don't have a network entity...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 28 Mar 2016 13:54:51 +0000 (13:54 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 28 Mar 2016 13:54:51 +0000 (13:54 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12252 d7cf8633-e32d-0410-b094-e92efae38249

cl_collision.c

index d6637a5d128bae1f469e91fbbc79701b1eb55639..d414361ca1c981e6a89cdae4f31c7740fd171ebc 100644 (file)
@@ -317,6 +317,8 @@ trace_t CL_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int
                                continue;
 
                        // don't hit players that don't exist
+                       if (!cl.entities_active[i])
+                               continue;
                        if (!cl.scores[i-1].name[0])
                                continue;
 
@@ -533,6 +535,8 @@ trace_t CL_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_
                                continue;
 
                        // don't hit players that don't exist
+                       if (!cl.entities_active[i])
+                               continue;
                        if (!cl.scores[i-1].name[0])
                                continue;
 
@@ -776,6 +780,8 @@ trace_t CL_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, co
                                continue;
 
                        // don't hit players that don't exist
+                       if (!cl.entities_active[i])
+                               continue;
                        if (!cl.scores[i-1].name[0])
                                continue;