X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=gl_rsurf.c;h=a832e4fa3cbc6d5f355574750c83a56b1fd68f06;hb=57073ad18687c89fad109bb6293bdb75546d78bd;hp=5864b4578c1165daa27394542f30c461e7b503fc;hpb=feb22f39c2c1a481b8c7a2364767b6402d5d94a1;p=xonotic%2Fdarkplaces.git diff --git a/gl_rsurf.c b/gl_rsurf.c index 5864b457..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)) @@ -595,7 +595,7 @@ void R_View_WorldVisibility(qbool forcenovis) } } } - R_View_WorldVisibility_CullSurfaces(); + R_View_WorldVisibility_CullSurfaces(); } }