Skip to content

Commit e94a5db

Browse files
committed
Improve on ValveSoftware#1528
1 parent 55d2dee commit e94a5db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/game/shared/tf/tf_weapon_sniperrifle.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ void CTFSniperRifle::PlayWeaponShootSound( void )
484484
#ifdef BDSBASE
485485
// Prevents Non-Machina rifles with "sniper_full_charge_damage_bonus"
486486
// from playing "SPECIAL3", which usually is Undefined
487-
if (flDamageBonus > 1.0f && GetRifleType() == RIFLE_MACHINA)
487+
const CEconItemView* pItem = GetAttributeContainer()->GetItem();
488+
489+
if (flDamageBonus > 1.0f && (pItem && pItem->GetStaticData()->GetWeaponReplacementSound(GetTeamNumber(), SPECIAL3)))
488490
#else
489491
if ( flDamageBonus > 1.0f )
490492
#endif

0 commit comments

Comments
 (0)