From 24c9dbde80155d1099ea9012f1dbf970a836e822 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Thu, 14 Jul 2005 21:12:27 +0000 Subject: * "sell weapons" now respects the build timer * Changed the human anticamp message * Anticamp mechanism now applies to using the reactor/repeater as it does the armoury * Anticamp mechanism is now triggered immediately after buying a weapon * Fixed bug where lcannon warning sound was missing with cg_drawGun 0 * Grenade is now an upgrade which is used like the antitox instead of a weapon * Fixed a bug where engaging spectator follow mode failed * Fixed a bug where spectator follow clients were counted as being on the team of the client followed --- src/cgame/cg_weapons.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index e9622edb..afd9bb45 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -245,7 +245,10 @@ void CG_RegisterUpgrade( int upgradeNum ) upgradeInfo->humanName = BG_FindHumanNameForUpgrade( upgradeNum ); - if( ( icon = BG_FindIconForUpgrade( upgradeNum ) ) ) + //la la la la la, i'm not listening! + if( upgradeNum == UP_GRENADE ) + upgradeInfo->upgradeIcon = cg_weapons[ WP_GRENADE ].weaponIcon; + else if( ( icon = BG_FindIconForUpgrade( upgradeNum ) ) ) upgradeInfo->upgradeIcon = trap_R_RegisterShader( icon ); } @@ -1243,6 +1246,12 @@ void CG_AddViewWeapon( playerState_t *ps ) if( ( ps->stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) > BA_NONE ) CG_GhostBuildable( ps->stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ); + if( weapon == WP_LUCIFER_CANNON && ps->stats[ STAT_MISC ] > 0 ) + { + if( ps->stats[ STAT_MISC ] > ( LCANNON_TOTAL_CHARGE - ( LCANNON_TOTAL_CHARGE / 3 ) ) ) + trap_S_AddLoopingSound( ps->clientNum, ps->origin, vec3_origin, cgs.media.lCannonWarningSound ); + } + // no gun if in third person view if( cg.renderingThirdPerson ) return; @@ -1298,9 +1307,6 @@ 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