I've minimized the antiwall hack to 1 function that can be plugged into any quake client
and called in SV_WriteEntitiesToClient like normal...
I've updated RAGE.quakeone.com with this and it works perfectly!
Code:
qboolean SV_InvisibleToClient(edict_t *viewer, edict_t *seen)
{
int i;
trace_t tr;
vec3_t start;
vec3_t end;
memset (&tr, 0, sizeof(tr));
VectorAdd(viewer->v.origin, viewer->v.view_ofs, start);
tr.fraction = 1;
for (i = 0; i < 8; i++)
{
end[0] = seen->v.origin[0] + ((i&1)?seen->v.mins[0]:seen->v.maxs[0]);
end[1] = seen->v.origin[1] + ((i&2)?seen->v.mins[1]:seen->v.maxs[1]);
end[2] = seen->v.origin[2] + ((i&4)?seen->v.mins[2]+0.1:seen->v.maxs[2]);
tr.fraction = 1;
if ((SV_RecursiveHullCheck (sv.worldmodel->hulls, 0, 0, 1, start, end, &tr)))
return false;
}
return true;
}
Code:
if (SV_InvisibleToClient(clent,ent))
continue;

Comment