Skip to content

Commit

Permalink
render local entities as late as possible (#1200)
Browse files Browse the repository at this point in the history
this should defer an overflow of refents occurring that would result in e.g. map models disappearing (light poles on mp/ffa5)
localents are a lower priority, we can afford to miss out on force push/grip effects in these cases
  • Loading branch information
Razish committed Feb 19, 2024
1 parent 540edeb commit 2d618a5
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 72 deletions.
5 changes: 4 additions & 1 deletion code/cgame/cg_view.cpp
Expand Up @@ -2141,7 +2141,6 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
if ( !cg.hyperspace ) {
CG_AddPacketEntities(qfalse); // adter calcViewValues, so predicted player state is correct
CG_AddMarks();
CG_AddLocalEntities();
CG_DrawMiscEnts();
}

Expand Down Expand Up @@ -2211,6 +2210,10 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
CG_AddTestModel();
}

if ( !cg.hyperspace ) {
CG_AddLocalEntities();
}

memcpy( cg.refdef.areamask, cg.snap->areamask, sizeof( cg.refdef.areamask ) );

// update audio positions
Expand Down

0 comments on commit 2d618a5

Please sign in to comment.