From 418f04083de4fb25c3db1ec8304576a55451ae7a Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 31 Jan 2010 04:16:11 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.2