X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=gl_rmain.c;h=c7c01393420c279deff28df75cd81f31d4dee294;hb=48433673fd843f8e32d2229837ed7f73ad770d76;hp=e7cfe472fe779b9c9f0fe3fa0aa081ef0a38e14d;hpb=89b8278762db0ca3e7de1b9f9ac70bb93f1ac6c7;p=xonotic%2Fdarkplaces.git diff --git a/gl_rmain.c b/gl_rmain.c index e7cfe472..c7c01393 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -4359,6 +4359,7 @@ void GL_Main_Init(void) Cvar_RegisterVariable(&r_cullentities_trace_tempentitysamples); Cvar_RegisterVariable(&r_cullentities_trace_enlarge); Cvar_RegisterVariable(&r_cullentities_trace_delay); + Cvar_RegisterVariable(&r_cullentities_trace_eyejitter); Cvar_RegisterVariable(&r_sortentities); Cvar_RegisterVariable(&r_drawviewmodel); Cvar_RegisterVariable(&r_drawexteriormodel); @@ -5282,7 +5283,7 @@ qboolean R_CanSeeBox(int numsamples, vec_t eyejitter, vec_t entboxenlarge, vec3_ end[1] = boxmins[1] + (boxmaxs[1] - boxmins[1]) * positions[i][1]; end[2] = boxmins[2] + (boxmaxs[2] - boxmins[2]) * positions[i][2]; //trace_t trace = CL_TraceLine(start, end, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, SUPERCONTENTS_SKY, 0.0f, true, false, NULL, true, true); - trace_t trace = CL_Cache_TraceLineSurfaces(start, end, MOVE_NOMONSTERS, SUPERCONTENTS_SOLID, SUPERCONTENTS_SKY); + trace_t trace = CL_Cache_TraceLineSurfaces(start, end, MOVE_NORMAL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT); // not picky - if the trace ended anywhere in the box we're good if (BoxesOverlap(trace.endpos, trace.endpos, boxmins, boxmaxs)) return true; @@ -5298,7 +5299,7 @@ qboolean R_CanSeeBox(int numsamples, vec_t eyejitter, vec_t entboxenlarge, vec3_ VectorSet(end, lhrandom(boxmins[0], boxmaxs[0]), lhrandom(boxmins[1], boxmaxs[1]), lhrandom(boxmins[2], boxmaxs[2])); if (r_cullentities_trace_entityocclusion.integer) { - trace_t trace = CL_TraceLine(start, end, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, SUPERCONTENTS_SKY, 0.0f, true, false, NULL, true, true); + trace_t trace = CL_Cache_TraceLineSurfaces(start, end, MOVE_NORMAL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT); // not picky - if the trace ended anywhere in the box we're good if (BoxesOverlap(trace.endpos, trace.endpos, boxmins, boxmaxs)) return true;