diff options
author | Tim Angus <tim@ngus.net> | 2006-02-26 11:00:56 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-02-26 11:00:56 +0000 |
commit | a59e1bf12d2fe0091eeb3ef3df8ce5a82baa1c8b (patch) | |
tree | cbd9c07aa6675ac4d6776414bf3d36d07e4329e1 /src/cgame/cg_ents.c | |
parent | 6d725eb07296b5ca6037e13fc6dac3d4df38de04 (diff) |
* Fixed bogus tutorial text when spectating
* Fixed tesla/reactor trails getting too long
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r-- | src/cgame/cg_ents.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 0c279a31..1c7d6a05 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -249,8 +249,22 @@ static void CG_EntityEffects( centity_t *cent ) trap_R_AddLightToScene( cent->lerpOrigin, i, r, g, b ); } - if( cg.time > cent->muzzleTSDeathTime && CG_IsTrailSystemValid( ¢->muzzleTS ) ) - CG_DestroyTrailSystem( ¢->muzzleTS ); + if( CG_IsTrailSystemValid( ¢->muzzleTS ) ) + { + if( cent->currentState.eType == ET_BUILDABLE ) + { + vec3_t front, back; + + CG_AttachmentPoint( ¢->muzzleTS->frontAttachment, front ); + CG_AttachmentPoint( ¢->muzzleTS->backAttachment, back ); + + if( Distance( front, back ) > TESLAGEN_RANGE ) + CG_DestroyTrailSystem( ¢->muzzleTS ); + } + + if( cg.time > cent->muzzleTSDeathTime && CG_IsTrailSystemValid( ¢->muzzleTS ) ) + CG_DestroyTrailSystem( ¢->muzzleTS ); + } } |