From d994c6df9a9753f54d45fcf811120df5295d3dec Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 27 May 2023 22:06:16 +0300 Subject: [PATCH] ref: a bit more verbosity if UserTracer color exceed limit --- ref/gl/gl_rpart.c | 4 ++-- ref/soft/r_part.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ref/gl/gl_rpart.c b/ref/gl/gl_rpart.c index 00954af1..086fd0ae 100644 --- a/ref/gl/gl_rpart.c +++ b/ref/gl/gl_rpart.c @@ -229,9 +229,9 @@ void CL_DrawTracers( double frametime, particle_t *cl_active_tracers ) VectorAdd( verts[0], delta, verts[2] ); VectorAdd( verts[1], delta, verts[3] ); - if( p->color > sizeof( gTracerColors ) / sizeof( color24 ) ) + if( p->color > sizeof( gTracerColors ) / sizeof( gTracerColors[0] )) { - gEngfuncs.Con_Printf( S_ERROR "UserTracer with color > %d\n", sizeof( gTracerColors ) / sizeof( color24 )); + gEngfuncs.Con_Printf( S_ERROR "UserTracer with color(%d) > %d\n", p->color, sizeof( gTracerColors ) / sizeof( gTracerColors[0] )); p->color = 0; } diff --git a/ref/soft/r_part.c b/ref/soft/r_part.c index 790b843e..0839255a 100644 --- a/ref/soft/r_part.c +++ b/ref/soft/r_part.c @@ -236,9 +236,9 @@ void GAME_EXPORT CL_DrawTracers( double frametime, particle_t *cl_active_tracers VectorAdd( verts[0], delta, verts[2] ); VectorAdd( verts[1], delta, verts[3] ); - if( p->color > sizeof( gTracerColors ) / sizeof( color24 ) ) + if( p->color > sizeof( gTracerColors ) / sizeof( gTracerColors[0] )) { - gEngfuncs.Con_Printf( S_ERROR "UserTracer with color > %d\n", sizeof( gTracerColors ) / sizeof( color24 )); + gEngfuncs.Con_Printf( S_ERROR "UserTracer with color(%d) > %d\n", p->color, sizeof( gTracerColors ) / sizeof( gTracerColors[0] )); p->color = 0; }