]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fixed bug with SSQC entity collision in CSQC
authorReki <spiper212@gmail.com>
Thu, 15 Apr 2021 03:58:02 +0000 (23:58 -0400)
committerReki <spiper212@gmail.com>
Thu, 15 Apr 2021 03:58:02 +0000 (23:58 -0400)
cl_collision.c

index 68e47b626b171ff371b12d7d997a381acb05ecab..58026c6881578c1fcfff653fdb3d6c3d7d4e6015 100644 (file)
@@ -306,7 +306,7 @@ trace_t CL_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int
                vec3_t origin, entmins, entmaxs;
                matrix4x4_t entmatrix, entinversematrix;
                
-               for (i = cl.maxclients;i < cl.num_entities;i++)
+               for (i = cl.maxclients + 1;i < cl.num_entities;i++)
                {
                        entity_render_t *ent = &cl.entities[i].render;
                        entity_state_t *ent_fields = &cl.entities[i].state_current;
@@ -568,7 +568,7 @@ trace_t CL_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_
                vec3_t origin, entmins, entmaxs;
                matrix4x4_t entmatrix, entinversematrix;
                
-               for (i = cl.maxclients;i < cl.num_entities;i++)
+               for (i = cl.maxclients + 1;i < cl.num_entities;i++)
                {
                        entity_render_t *ent = &cl.entities[i].render;
                        entity_state_t *ent_fields = &cl.entities[i].state_current;
@@ -854,7 +854,7 @@ trace_t CL_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, co
                vec3_t origin, entmins, entmaxs;
                matrix4x4_t entmatrix, entinversematrix;
                
-               for (i = cl.maxclients;i < cl.num_entities;i++)
+               for (i = cl.maxclients + 1;i < cl.num_entities;i++)
                {
                        entity_render_t *ent = &cl.entities[i].render;
                        entity_state_t *ent_fields = &cl.entities[i].state_current;