Skip to content

Commit fcffda8

Browse files
committed
NUKE RDF_SKYBOXPORTAL usages
This is half of a feature from Wolf:ET, but we don't have the sgame/cgame counterpart, and none of the maps made for Unvanquished/Tremulous appear to use it.
1 parent b9bb7d8 commit fcffda8

File tree

2 files changed

+7
-35
lines changed

2 files changed

+7
-35
lines changed

src/engine/renderer/tr_scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ void RE_RenderScene( const refdef_t *fd )
541541
// will force a reset of the visible leafs even if the view hasn't moved
542542
tr.refdef.areamaskModified = false;
543543

544-
if ( !( tr.refdef.rdflags & RDF_NOWORLDMODEL ) && !( ( tr.refdef.rdflags & RDF_SKYBOXPORTAL ) && tr.world->numSkyNodes > 0 ) )
544+
if ( !( tr.refdef.rdflags & RDF_NOWORLDMODEL ) )
545545
{
546546
int areaDiff;
547547
int i;

src/engine/renderer/tr_world.cpp

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)