Skip to content

Commit

Permalink
gl_rsurf: Actually use the model pointer
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13032 d7cf8633-e32d-0410-b094-e92efae38249
  • Loading branch information
cloudwalk committed Oct 25, 2020
1 parent ad05a04 commit 1da3a56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gl_rsurf.c
Expand Up @@ -386,12 +386,12 @@ void R_DrawPortals(void)
model_t *model = r_refdef.scene.worldmodel;
if (model == NULL)
return;
for (leafnum = 0;leafnum < r_refdef.scene.worldmodel->brush.num_leafs;leafnum++)
for (leafnum = 0;leafnum < model->brush.num_leafs;leafnum++)
{
if (r_refdef.viewcache.world_leafvisible[leafnum])
{
//for (portalnum = 0, portal = model->brush.data_portals;portalnum < model->brush.num_portals;portalnum++, portal++)
for (portal = r_refdef.scene.worldmodel->brush.data_leafs[leafnum].portals;portal;portal = portal->next)
for (portal = model->brush.data_leafs[leafnum].portals;portal;portal = portal->next)
{
if (portal->numpoints <= POLYGONELEMENTS_MAXPOINTS)
if (!R_CullBox(portal->mins, portal->maxs))
Expand Down

0 comments on commit 1da3a56

Please sign in to comment.