Skip to content

Commit

Permalink
Clear Sky: Crash when some weapons(eg. wpn_val) with built in suppres…
Browse files Browse the repository at this point in the history
…sor don't have snd_silncer_shot only snd_shoot
  • Loading branch information
sobkas committed May 20, 2024
1 parent f3383c2 commit f4f9284
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/xrGame/WeaponMagazined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ void CWeaponMagazined::Load(LPCSTR section)
m_sSilencerSmokeParticles = pSettings->r_string(section, "silencer_smoke_particles");

//Alundaio: LAYERED_SND_SHOOT Silencer
m_layered_sounds.LoadSound(section, "snd_silncer_shot", "sndSilencerShot", false, m_eSoundShot);
if (WeaponSoundExist(section, "snd_silncer_shot"))
{
m_layered_sounds.LoadSound(section, "snd_silncer_shot", "sndSilencerShot", false, m_eSoundShot);
}
else
{
m_layered_sounds.LoadSound(section, "snd_shoot", "sndSilencerShot", false, m_eSoundShot);
}

if (WeaponSoundExist(section, "snd_silncer_shot_actor"))
m_layered_sounds.LoadSound(section, "snd_silncer_shot_actor", "sndSilencerShotActor", false, m_eSoundShot);
//-Alundaio
Expand Down

0 comments on commit f4f9284

Please sign in to comment.