Skip to content

Commit

Permalink
Merge PR 'Only use BoxTouchingVisibleLeafs when not using r_novis'
Browse files Browse the repository at this point in the history
Updates the entity visibility check in `R_View_UpdateEntityVisible` so
that with `r_novis 1` entities are rendered when the player is outside
of the level.

Resolves DarkPlacesEngine/DarkPlaces#188

See DarkPlacesEngine/DarkPlaces#192

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
  • Loading branch information
hemebond authored Aug 15, 2024
1 parent a94d756 commit c443fba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gl_rmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -4007,7 +4007,7 @@ static void R_View_UpdateEntityVisible (void)
if (!r_drawexteriormodel.integer)
renderimask |= RENDER_EXTERIORMODEL;
memset(r_refdef.viewcache.entityvisible, 0, r_refdef.scene.numentities);
if (r_refdef.scene.worldmodel && r_refdef.scene.worldmodel->brush.BoxTouchingVisibleLeafs)
if (r_refdef.scene.worldmodel && !r_novis.integer && r_refdef.scene.worldmodel->brush.BoxTouchingVisibleLeafs)
{
// worldmodel can check visibility
for (i = 0;i < r_refdef.scene.numentities;i++)
Expand Down

0 comments on commit c443fba

Please sign in to comment.