summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-02-26 11:00:56 +0000
committerTim Angus <tim@ngus.net>2006-02-26 11:00:56 +0000
commita59e1bf12d2fe0091eeb3ef3df8ce5a82baa1c8b (patch)
treecbd9c07aa6675ac4d6776414bf3d36d07e4329e1 /src/cgame/cg_ents.c
parent6d725eb07296b5ca6037e13fc6dac3d4df38de04 (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.c18
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( &cent->muzzleTS ) )
- CG_DestroyTrailSystem( &cent->muzzleTS );
+ if( CG_IsTrailSystemValid( &cent->muzzleTS ) )
+ {
+ if( cent->currentState.eType == ET_BUILDABLE )
+ {
+ vec3_t front, back;
+
+ CG_AttachmentPoint( &cent->muzzleTS->frontAttachment, front );
+ CG_AttachmentPoint( &cent->muzzleTS->backAttachment, back );
+
+ if( Distance( front, back ) > TESLAGEN_RANGE )
+ CG_DestroyTrailSystem( &cent->muzzleTS );
+ }
+
+ if( cg.time > cent->muzzleTSDeathTime && CG_IsTrailSystemValid( &cent->muzzleTS ) )
+ CG_DestroyTrailSystem( &cent->muzzleTS );
+ }
}