{
vec3_t origin, entmins, entmaxs;
matrix4x4_t entmatrix, entinversematrix;
+
+ if(gamemode == GAME_NEXUIZ)
+ {
+ // don't hit network players, if we are a nonsolid player
+ if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
+ goto skipnetworkplayers;
+ }
+
for (i = 1;i <= cl.maxclients;i++)
{
entity_render_t *ent = &cl.entities[i].render;
- // don't hit players that don't exist
- if (!cl.scores[i-1].name[0])
- continue;
+
// don't hit ourselves
if (i == cl.playerentity)
continue;
+
+ // don't hit players that don't exist
+ if (!cl.scores[i-1].name[0])
+ continue;
+
+ if(gamemode == GAME_NEXUIZ)
+ {
+ // don't hit spectators or nonsolid players
+ if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
+ continue;
+ }
+
Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
VectorAdd(origin, cl.playerstandmins, entmins);
VectorAdd(origin, cl.playerstandmaxs, entmaxs);
*hitnetworkentity = i;
Collision_CombineTraces(&cliptrace, &trace, NULL, false);
}
+
+skipnetworkplayers:
+ ;
}
// clip to entities