]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
added a check in r_cullentities_trace to always show entities if the eye
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 31 Jan 2010 04:16:11 +0000 (04:16 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 31 Jan 2010 04:16:11 +0000 (04:16 +0000)
is inside their culling box

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9898 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index d72a3194042eeef3ef743bb9bc33daa4ca5e714e..11b2d3a78ea9e2ba39d25da8e95461c7fc565af4 100644 (file)
@@ -6676,6 +6676,10 @@ static qboolean R_CanSeeBox(int numsamples, vec_t enlarge, vec3_t eye, vec3_t en
        boxmins[2] = (enlarge+1) * entboxmins[2] - enlarge * entboxmaxs[2];
        boxmaxs[2] = (enlarge+1) * entboxmaxs[2] - enlarge * entboxmins[2];
 
+       // return true if eye is inside enlarged box
+       if (BoxesOverlap(boxmins, boxmaxs, eye, eye))
+               return true;
+
        // try center
        VectorCopy(eye, start);
        VectorMAM(0.5f, boxmins, 0.5f, boxmaxs, end);