From 01b2fd216a79749a0d801e87a44ba1b399b2a977 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Thu, 25 Mar 2004 05:19:23 +0000 Subject: * Fixed particle system infinite loop bug in trem2 * Spawns that are interfered with plats now suicide * Fixed spectator scrolling colour screwup --- src/cgame/cg_buildable.c | 4 ++++ src/cgame/cg_draw.c | 10 ++++++++-- src/cgame/cg_particles.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index d5f6871e..708e8277 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -551,6 +551,10 @@ static void CG_RunBuildableLerpFrame( centity_t *cent ) // see if the animation sequence is switching if( newAnimation != lf->animationNumber || !lf->animation ) { + if( cg_debugRandom.integer ) + CG_Printf( "newAnimation: %d lf->animationNumber: %d lf->animation: %d\n", + newAnimation, lf->animationNumber, !!lf->animation ); + CG_SetBuildableLerpFrameAnimation( buildable, lf, newAnimation ); if( !cg_buildables[ buildable ].sounds[ newAnimation ].looped && diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 4608893f..eb098793 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1495,8 +1495,14 @@ static void CG_DrawTeamSpectators( rectDef_t *rect, float scale, vec4_t color, q { if( cg.spectatorOffset < cg.spectatorLen ) { - cg.spectatorPaintX += CG_Text_Width( &cg.spectatorList[ cg.spectatorOffset ], scale, 1 ) - 1; - cg.spectatorOffset++; + //TA: skip colour directives + if( Q_IsColorString( &cg.spectatorList[ cg.spectatorOffset ] ) ) + cg.spectatorOffset += 2; + else + { + cg.spectatorPaintX += CG_Text_Width( &cg.spectatorList[ cg.spectatorOffset ], scale, 1 ) - 1; + cg.spectatorOffset++; + } } else { diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c index cc7c4722..9b37382a 100644 --- a/src/cgame/cg_particles.c +++ b/src/cgame/cg_particles.c @@ -275,7 +275,7 @@ static void CG_SpawnNewParticles( void ) //calculate next ejection time lerpFrac = 1.0 - ( (float)pe->count / (float)pe->totalParticles ); - pe->nextEjectionTime = cg.time + CG_RandomiseValue( + pe->nextEjectionTime = cg.time + (int)CG_RandomiseValue( CG_LerpValues( pe->ejectPeriod.initial, pe->ejectPeriod.final, lerpFrac ), -- cgit