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~746 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3bbf0f0c628781575d95a48e69abd0f212e74c38;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 ::stable-branch::merge=418f04083de4fb25c3db1ec8304576a55451ae7a --- diff --git a/gl_rmain.c b/gl_rmain.c index 4233c9ef..6f84051c 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);