From 23e5d1b97402c638c2207031ed8e097e64b5342c Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 20 Mar 2004 00:10:20 +0000 Subject: * Added lcannon warning and blowup * Fixed some serious bugs in the spawn queue code --- src/cgame/cg_local.h | 2 ++ src/cgame/cg_main.c | 2 ++ src/cgame/cg_weapons.c | 3 +++ 3 files changed, 7 insertions(+) (limited to 'src/cgame') diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index c3fd240e..e637742e 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1221,6 +1221,8 @@ typedef struct qhandle_t humanBuildableDestroyedPS; qhandle_t alienBuildableDamagedPS; qhandle_t alienBuildableDestroyedPS; + + sfxHandle_t lCannonWarningSound; } cgMedia_t; diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 725cc195..54d6feac 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -673,6 +673,8 @@ static void CG_RegisterSounds( void ) cgs.media.buildableRepairSound = trap_S_RegisterSound( "sound/buildables/human/repair.wav", qfalse ); cgs.media.buildableRepairedSound = trap_S_RegisterSound( "sound/buildables/human/repaired.wav", qfalse ); + + cgs.media.lCannonWarningSound = trap_S_RegisterSound( "models/weapons/lcannon/warning.wav", qfalse ); } diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index e01339db..87534f23 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1274,6 +1274,9 @@ void CG_AddViewWeapon( playerState_t *ps ) VectorMA( hand.origin, random( ) * fraction, cg.refdef.viewaxis[ 0 ], hand.origin ); VectorMA( hand.origin, random( ) * fraction, cg.refdef.viewaxis[ 1 ], hand.origin ); + + if( ps->stats[ STAT_MISC ] > ( LCANNON_TOTAL_CHARGE - ( LCANNON_TOTAL_CHARGE / 3 ) ) ) + trap_S_AddLoopingSound( ps->clientNum, ps->origin, vec3_origin, cgs.media.lCannonWarningSound ); } AnglesToAxis( angles, hand.axis ); -- cgit