]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
R_CanSeeBox no longer uses collision_cache for the random traces, only the fixed...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Jan 2020 06:24:40 +0000 (06:24 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Jan 2020 06:24:40 +0000 (06:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12494 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index d5412af87045d67763d24566f0acf04bab19118a..2c66ba0ab00e2c0cbbc6bb3e43603cea34cbc775 100644 (file)
@@ -3955,7 +3955,7 @@ qboolean R_CanSeeBox(int numsamples, vec_t eyejitter, vec_t entboxenlarge, vec_t
                        end[0] = boxmins[0] + (boxmaxs[0] - boxmins[0]) * positions[i][0];
                        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_TraceLine(start, end, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID, SUPERCONTENTS_SKY, MATERIALFLAGMASK_TRANSLUCENT, 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, padmins, padmaxs))
@@ -3972,7 +3972,7 @@ qboolean R_CanSeeBox(int numsamples, vec_t eyejitter, vec_t entboxenlarge, vec_t
                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_Cache_TraceLineSurfaces(start, end, MOVE_NORMAL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT);
+                       trace_t trace = CL_TraceLine(start, end, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID, SUPERCONTENTS_SKY, MATERIALFLAGMASK_TRANSLUCENT, 0.0f, true, false, NULL, true, true);
                        // not picky - if the trace ended anywhere in the box we're good
                        if (BoxesOverlap(trace.endpos, trace.endpos, padmins, padmaxs))
                                return true;