ref: a bit more verbosity if UserTracer color exceed limit

This commit is contained in:
Alibek Omarov 2023-05-27 22:06:16 +03:00
parent 3a57f26351
commit d994c6df9a
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}