@@ -517,7 +517,7 @@ static void R_DrawEntitiesOnList( void )
517517 d_pdrawspans = R_PolysetFillSpans8 ;
518518 GL_SetRenderMode ( kRenderNormal );
519519 // first draw solid entities
520- for ( i = 0 ; i < tr .draw_list -> num_solid_entities && !RI .onlyClientDraw ; i ++ )
520+ for ( i = 0 ; i < tr .draw_list -> num_solid_entities && !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) ; i ++ )
521521 {
522522 RI .currententity = tr .draw_list -> solid_entities [i ];
523523 RI .currentmodel = RI .currententity -> model ;
@@ -545,7 +545,7 @@ static void R_DrawEntitiesOnList( void )
545545
546546 R_SetUpWorldTransform ();
547547 // draw sprites seperately, because of alpha blending
548- for ( i = 0 ; i < tr .draw_list -> num_solid_entities && !RI .onlyClientDraw ; i ++ )
548+ for ( i = 0 ; i < tr .draw_list -> num_solid_entities && !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) ; i ++ )
549549 {
550550 RI .currententity = tr .draw_list -> solid_entities [i ];
551551 RI .currentmodel = RI .currententity -> model ;
@@ -561,7 +561,7 @@ static void R_DrawEntitiesOnList( void )
561561 }
562562 }
563563
564- if ( !RI .onlyClientDraw )
564+ if ( !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) )
565565 {
566566 gEngfuncs .CL_DrawEFX ( tr .frametime , false );
567567 }
@@ -571,7 +571,7 @@ static void R_DrawEntitiesOnList( void )
571571
572572 d_pdrawspans = R_PolysetDrawSpans8_33 ;
573573 // then draw translucent entities
574- for ( i = 0 ; i < tr .draw_list -> num_trans_entities && !RI .onlyClientDraw ; i ++ )
574+ for ( i = 0 ; i < tr .draw_list -> num_trans_entities && !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) ; i ++ )
575575 {
576576 RI .currententity = tr .draw_list -> trans_entities [i ];
577577 RI .currentmodel = RI .currententity -> model ;
@@ -612,7 +612,7 @@ static void R_DrawEntitiesOnList( void )
612612 if ( FBitSet ( RI .rvp .flags , RF_DRAW_WORLD ))
613613 gEngfuncs .pfnDrawTransparentTriangles ();
614614
615- if ( !RI .onlyClientDraw )
615+ if ( !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) )
616616 {
617617 R_AllowFog ( false );
618618 gEngfuncs .CL_DrawEFX ( tr .frametime , true );
@@ -621,7 +621,7 @@ static void R_DrawEntitiesOnList( void )
621621
622622 GL_SetRenderMode ( kRenderNormal );
623623 R_SetUpWorldTransform ();
624- if ( !RI .onlyClientDraw )
624+ if ( !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) )
625625 R_DrawViewModel ();
626626 gEngfuncs .CL_ExtraUpdate ();
627627
@@ -792,7 +792,7 @@ static void R_DrawBEntitiesOnList( void )
792792 VectorCopy ( tr .modelorg , oldorigin );
793793 insubmodel = true;
794794
795- for ( i = 0 ; i < tr .draw_list -> num_edge_entities && !RI .onlyClientDraw ; i ++ )
795+ for ( i = 0 ; i < tr .draw_list -> num_edge_entities && !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) ; i ++ )
796796 {
797797 int k ;
798798 RI .currententity = tr .draw_list -> edge_entities [i ];
@@ -1147,7 +1147,6 @@ void R_SetupRefParams( const ref_viewpass_t *rvp )
11471147{
11481148 RI .rvp = * rvp ;
11491149
1150- RI .onlyClientDraw = FBitSet ( rvp -> flags , RF_ONLY_CLIENTDRAW );
11511150}
11521151
11531152/*
@@ -1182,7 +1181,7 @@ void GAME_EXPORT R_RenderFrame( const ref_viewpass_t *rvp )
11821181 }
11831182
11841183 tr .fCustomRendering = false;
1185- if ( !RI .onlyClientDraw )
1184+ if ( !FBitSet ( RI .rvp . flags , RF_ONLY_CLIENTDRAW ) )
11861185 R_RunViewmodelEvents ();
11871186
11881187 tr .realframecount ++ ; // right called after viewmodel events
0 commit comments