@@ -794,20 +794,6 @@ static void R_MarkLeaves()
794794 continue ;
795795 }
796796
797- // ydnar: don't want to walk the entire bsp to add skybox surfaces
798- if ( tr.refdef .rdflags & RDF_SKYBOXPORTAL )
799- {
800- // this only happens once, as game/cgame know the origin of the skybox
801- // this also means the skybox portal cannot move, as this list is calculated once and never again
802- if ( tr.world ->numSkyNodes < WORLD_MAX_SKY_NODES )
803- {
804- tr.world ->skyNodes [ tr.world ->numSkyNodes ++ ] = leaf;
805- }
806-
807- R_AddLeafSurfaces ( leaf, FRUSTUM_CLIPALL );
808- continue ;
809- }
810-
811797 parent = leaf;
812798
813799 do
@@ -846,28 +832,14 @@ void R_AddWorldSurfaces()
846832 // clear out the visible min/max
847833 ClearBounds ( tr.viewParms .visBounds [ 0 ], tr.viewParms .visBounds [ 1 ] );
848834
849- // render sky or world?
850- if ( tr.refdef .rdflags & RDF_SKYBOXPORTAL && tr.world ->numSkyNodes > 0 )
851- {
852- int i;
853- bspNode_t **node;
835+ // determine which leaves are in the PVS / areamask
836+ R_MarkLeaves ();
854837
855- for ( i = 0 , node = tr.world ->skyNodes ; i < tr.world ->numSkyNodes ; i++, node++ )
856- {
857- R_AddLeafSurfaces ( *node, FRUSTUM_CLIPALL );
858- }
859- }
860- else
861- {
862- // determine which leaves are in the PVS / areamask
863- R_MarkLeaves ();
864-
865- // clear traversal list
866- backEndData[ tr.smpFrame ]->traversalLength = 0 ;
838+ // clear traversal list
839+ backEndData[ tr.smpFrame ]->traversalLength = 0 ;
867840
868- // update visbounds and add surfaces that weren't cached with VBOs
869- R_RecursiveWorldNode ( tr.world ->nodes , FRUSTUM_CLIPALL );
870- }
841+ // update visbounds and add surfaces that weren't cached with VBOs
842+ R_RecursiveWorldNode ( tr.world ->nodes , FRUSTUM_CLIPALL );
871843}
872844
873845/*
0 commit comments