Browse Source

ref: a bit more verbosity if UserTracer color exceed limit

pull/2/head
Alibek Omarov 2 years ago
parent
commit
d994c6df9a
  1. 4
      ref/gl/gl_rpart.c
  2. 4
      ref/soft/r_part.c

4
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[0], delta, verts[2] );
VectorAdd( verts[1], delta, verts[3] ); 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; p->color = 0;
} }

4
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[0], delta, verts[2] );
VectorAdd( verts[1], delta, verts[3] ); 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; p->color = 0;
} }

Loading…
Cancel
Save