]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
Add entity number to showtex overlay.
[xonotic/darkplaces.git] / gl_rmain.c
index e7cfe472fe779b9c9f0fe3fa0aa081ef0a38e14d..c7c01393420c279deff28df75cd81f31d4dee294 100644 (file)
@@ -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;