From: havoc Date: Sun, 31 Jan 2010 04:16:11 +0000 (+0000) Subject: added a check in r_cullentities_trace to always show entities if the eye X-Git-Tag: xonotic-v0.1.0preview~230^2~571 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=418f04083de4fb25c3db1ec8304576a55451ae7a;p=xonotic%2Fdarkplaces.git added a check in r_cullentities_trace to always show entities if the eye is inside their culling box git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9898 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index d72a3194..11b2d3a7 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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);