]> git.xonotic.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)
committerRudolf Polzer <divVerent@alientrap.org>
Mon, 1 Feb 2010 07:17:34 +0000 (08:17 +0100)
is inside their culling box

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9898 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=418f04083de4fb25c3db1ec8304576a55451ae7a

gl_rmain.c

index 4233c9ef20e6f8afbd4357d9a3bebe8edae38614..6f84051c3725288f113efda4759a28211252e8a3 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);