From 7d8b63fd88fac6e07f5960ff9f14bcbee143e68e Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 15 Apr 2019 02:17:43 +0300 Subject: [PATCH] ref: get rid of R_IncrementSpeedsCounter --- engine/client/cl_tent.c | 3 +-- engine/ref_api.h | 1 - ref_gl/gl_context.c | 13 ------------- ref_gl/gl_rmain.c | 10 +++++++++- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index cd408128..fc9fbd13 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -401,8 +401,7 @@ int CL_TempEntAddEntity( cl_entity_t *pEntity ) VectorCopy( pEntity->origin, pEntity->latched.prevorigin ); // add to list - if( CL_AddVisibleEntity( pEntity, ET_TEMPENTITY )) - ref.dllFuncs.R_IncrementSpeedsCounter( RS_ACTIVE_TENTS ); + CL_AddVisibleEntity( pEntity, ET_TEMPENTITY ); return 1; } diff --git a/engine/ref_api.h b/engine/ref_api.h index 83247361..b3cfc00a 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -466,7 +466,6 @@ typedef struct ref_interface_s // debug void (*R_ShowTextures)( void ); void (*R_ShowTree)( void ); - void (*R_IncrementSpeedsCounter)( int counterType ); // texture management const byte *(*R_GetTextureOriginalBuffer)( unsigned int idx ); // not always available diff --git a/ref_gl/gl_context.c b/ref_gl/gl_context.c index 4710df89..bf4d89ae 100644 --- a/ref_gl/gl_context.c +++ b/ref_gl/gl_context.c @@ -25,18 +25,6 @@ static void R_ClearScreen( void ) pglClear( GL_COLOR_BUFFER_BIT ); } -static void R_IncrementSpeedsCounter( int type ) -{ - switch( type ) - { - case RS_ACTIVE_TENTS: - r_stats.c_active_tents_count++; - break; - default: - gEngfuncs.Host_Error( "R_IncrementSpeedsCounter: unsupported type %d\n", type ); - } -} - static const byte *R_GetTextureOriginalBuffer( unsigned int idx ) { gl_texture_t *glt = R_GetTexture( idx ); @@ -370,7 +358,6 @@ ref_interface_t gReffuncs = R_ShowTextures, R_ShowTree, - R_IncrementSpeedsCounter, R_GetTextureOriginalBuffer, GL_LoadTextureFromBuffer, diff --git a/ref_gl/gl_rmain.c b/ref_gl/gl_rmain.c index fa220c16..d82ed116 100644 --- a/ref_gl/gl_rmain.c +++ b/ref_gl/gl_rmain.c @@ -249,8 +249,16 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type ) if( !R_ModelOpaque( clent->curstate.rendermode ) && CL_FxBlend( clent ) <= 0 ) return true; // invisible - if( type == ET_FRAGMENTED ) + switch( type ) + { + case ET_FRAGMENTED: r_stats.c_client_ents++; + break; + case ET_TEMPENTITY: + r_stats.c_active_tents_count++; + break; + default: break; + } if( R_OpaqueEntity( clent )) {