From 09c8ff57b88755f557bab5cb1aa5168fb6d78cb2 Mon Sep 17 00:00:00 2001 From: IronClawTrem Date: Sat, 22 Feb 2020 00:10:50 +0000 Subject: remove zoom sounds for lasgun --- src/cgame/cg_weapons.c | 4 ++-- src/game/g_active.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index ca0115f..2f437f0 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -859,7 +859,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent } //Zoom in / out sound - if( ( weaponNum == WP_LAS_GUN || weaponNum == WP_MASS_DRIVER ) && + if( ( weaponNum == WP_MASS_DRIVER ) && ( cent->currentState.eFlags & EF_ZOOM ) && !cent->zoomed ) { trap_S_StartSound( cent->lerpOrigin, cent->currentState.number, @@ -873,7 +873,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent cg.time + cg.time - cg.zoomTime - ZOOM_TIME ); } } - else if ( ( weaponNum == WP_LAS_GUN || weaponNum == WP_MASS_DRIVER ) && + else if ( ( weaponNum == WP_MASS_DRIVER ) && !( cent->currentState.eFlags & EF_ZOOM ) && cent->zoomed ) { trap_S_StartSound( cent->lerpOrigin, cent->currentState.number, diff --git a/src/game/g_active.c b/src/game/g_active.c index fcb888a..5076873 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -588,8 +588,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->time10000 += msec; // zoom detection - if( BG_InventoryContainsWeapon( WP_MASS_DRIVER, ent->client->ps.stats ) - || BG_InventoryContainsWeapon( WP_LAS_GUN, ent->client->ps.stats ) ) + if( BG_InventoryContainsWeapon( WP_MASS_DRIVER, ent->client->ps.stats ) ) { if( ( ucmd->buttons & BUTTON_ATTACK2 ) && !( ent->client->ps.eFlags & EF_ZOOM ) ) client->ps.eFlags |= EF_ZOOM; -- cgit