From: cloudwalk Date: Sun, 25 Oct 2020 14:32:20 +0000 (+0000) Subject: gl_rsurf: Actually use the model pointer X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1da3a56198abba3fabd8549782d8574ca1d02be3;p=xonotic%2Fdarkplaces.git gl_rsurf: Actually use the model pointer git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13032 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rsurf.c b/gl_rsurf.c index e47becbf..a832e4fa 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -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))