]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
gl_rmain: Don't draw any entities except the world and viewent if floating in the...
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Oct 2020 10:58:29 +0000 (10:58 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Oct 2020 10:58:29 +0000 (10:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13028 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 350ae2d25735214e9cbebf30a3c7f75b3526a7db..dd222050f6f04aedfe722bab70e485fd5aca2ee1 100644 (file)
@@ -4071,6 +4071,11 @@ static void R_View_UpdateEntityVisible (void)
                for (i = 0;i < r_refdef.scene.numentities;i++)
                {
                        ent = r_refdef.scene.entities[i];
+                       if (ent != &cl.viewent.render && r_refdef.viewcache.world_novis)
+                       {
+                               r_refdef.viewcache.entityvisible[i] = false;
+                               continue;
+                       }
                        if (!(ent->flags & renderimask))
                        if (!R_CullBox(ent->mins, ent->maxs) || (ent->model && ent->model->type == mod_sprite && (ent->model->sprite.sprnum_type == SPR_LABEL || ent->model->sprite.sprnum_type == SPR_LABEL_SCALE)))
                        if ((ent->flags & (RENDER_NODEPTHTEST | RENDER_WORLDOBJECT | RENDER_VIEWMODEL)) || r_refdef.scene.worldmodel->brush.BoxTouchingVisibleLeafs(r_refdef.scene.worldmodel, r_refdef.viewcache.world_leafvisible, ent->mins, ent->maxs))