]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
before calling Mod_CanSeeBox_Trace or TraceLineOfSight, check if the model actually...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 Jan 2008 13:48:57 +0000 (13:48 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 Jan 2008 13:48:57 +0000 (13:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7894 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c
sv_main.c

index c01a68859033abf7ea72a760fcf3d722929bf172..3e4ec0565e8d31d0af237298fb629a20a6549cf2 100644 (file)
@@ -2214,7 +2214,7 @@ static void R_View_UpdateEntityVisible (void)
                        r_viewcache.entityvisible[i] = !(ent->flags & renderimask) && ((ent->model && ent->model->type == mod_sprite && (ent->model->sprite.sprnum_type == SPR_LABEL || ent->model->sprite.sprnum_type == SPR_LABEL_SCALE)) || !R_CullBox(ent->mins, ent->maxs)) && ((ent->effects & EF_NODEPTHTEST) || (ent->flags & RENDER_VIEWMODEL) || r_refdef.worldmodel->brush.BoxTouchingVisibleLeafs(r_refdef.worldmodel, r_viewcache.world_leafvisible, ent->mins, ent->maxs));
 
                }
-               if(r_cullentities_trace.integer)
+               if(r_cullentities_trace.integer && r_refdef.worldmodel->brush.TraceLineOfSight)
                {
                        for (i = 0;i < r_refdef.numentities;i++)
                        {
index 8ce2f6d6923dd75b4957aa739c319a5cd2bc728a..539568693ea00baa323c578e96b5f5b7979aabed 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1263,7 +1263,7 @@ void SV_MarkWriteEntityStateToClient(entity_state_t *s)
                        }
 
                        // or not seen by random tracelines
-                       if (sv_cullentities_trace.integer && !isbmodel)
+                       if (sv_cullentities_trace.integer && !isbmodel && sv.worldmodel->brush.TraceLineOfSight)
                        {
                                int samples = s->specialvisibilityradius ? sv_cullentities_trace_samples_extra.integer : sv_cullentities_trace_samples.integer;
                                float enlarge = sv_cullentities_trace_enlarge.value;