summaryrefslogtreecommitdiff
path: root/src/cgame/cg_weapons.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_weapons.c')
-rw-r--r--src/cgame/cg_weapons.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index a74a15f4..d5c91aa8 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -644,6 +644,7 @@ void CG_InitWeapons( void )
CG_RegisterWeapon( i );
cgs.media.level2ZapTS = CG_RegisterTrailSystem( "models/weapons/lev2zap/lightning" );
+ cgs.media.massDriverTS = CG_RegisterTrailSystem( "models/weapons/mdriver/fireTS" );
}
@@ -1614,6 +1615,28 @@ void CG_MissileHitPlayer( weapon_t weaponNum, weaponMode_t weaponMode,
CG_MissileHitWall( weaponNum, weaponMode, 0, origin, dir, IMPACTSOUND_FLESH );
}
+/*
+==============
+CG_MassDriverFire
+
+Draws the mass driver trail
+==============
+*/
+
+void CG_MassDriverFire( entityState_t *es )
+{
+ trailSystem_t *ts;
+
+ ts = CG_SpawnNewTrailSystem( cgs.media.massDriverTS );
+ if( CG_IsTrailSystemValid( &ts ) )
+ {
+ CG_SetAttachmentPoint( &ts->frontAttachment, es->origin2 );
+ CG_SetAttachmentPoint( &ts->backAttachment, es->pos.trBase );
+ CG_AttachToPoint( &ts->frontAttachment );
+ CG_AttachToPoint( &ts->backAttachment );
+ }
+}
+
/*
============================================================================