Skip to content

Commit

Permalink
Fixed problem where weapon sounds from other players play more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
voxelizedworld committed Feb 13, 2021
1 parent 37fbba2 commit ccd1c21
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions mp/src/game/shared/sdk/sdk_fx_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ void FX_FireBullets(
iMode,
iSeed,
flSpread
);

bDoEffects = false; // no effects on server
);
#endif

iSeed++;
Expand All @@ -182,19 +180,16 @@ void FX_FireBullets(

WeaponSound_t sound_type = SINGLE;

#ifdef CLIENT_DLL
if ( bDoEffects)
if (bDoEffects)
{
#ifdef CLIENT_DLL
if (pPlayer)
pPlayer->m_flMuzzleFlashYaw = random->RandomFloat(0, 360);
//ProjectedLightEffectManager( iPlayerIndex ).TriggerMuzzleFlash();
}
#endif

FX_WeaponSound(iPlayerIndex, sound_type, vOrigin, pWeaponInfo);
FX_WeaponSound(iPlayerIndex, sound_type, vOrigin, pWeaponInfo);
}

// Fire bullets, calculate impacts & effects

if ( !pPlayer )
return;

Expand Down

0 comments on commit ccd1c21

Please sign in to comment.