Clear Sky: Missing variable in gun setting file
Crash when some weapons(eg. wpn_val) with built in suppressor don't have snd_silncer_shot only snd_shoot
I just checked the difference between CS and COP sources:
CS code was trying to use sndSilencerShot only if silencer attached and is actually attachable/detachable, assuming the use of normal sndShot when there's no silencer or it's built-in. In COP SilencerAttachable() check was commented out.
The most natural fix would be checking for sndSilencerShot existence in InitAddons function on line 1068.
Replace this:
if (IsSilencerAttached() /* && SilencerAttachable() */)
With this:
if (IsSilencerAttached() && m_layered_sounds.FindSoundItem("sndSilencerShot", false))
Please, change the code accordingly!
I just checked the difference between CS and COP sources:
CS code was trying to use
sndSilencerShotonly if silencer attached and is actually attachable/detachable, assuming the use of normalsndShotwhen there's no silencer or it's built-in. In COPSilencerAttachable()check was commented out.The most natural fix would be checking for
sndSilencerShotexistence in InitAddons function on line1068. Replace this:if (IsSilencerAttached() /* && SilencerAttachable() */)With this:
if (IsSilencerAttached() && m_layered_sounds.FindSoundItem("sndSilencerShot", false))Please, change the code accordingly!
Well it fixes also other problem I have found wpn_pb
Well it fixes also other problem I have found wpn_pb
What was that problem?
Well it fixes also other problem I have found wpn_pb
What was that problem?
It doesn't have silencer_light_color and family(all silencer_light_*) So when it tries to use any of them it crashes.
;silencer_flame_particles = weapons\generic_weapon03 ;silencer_smoke_particles = weapons\generic_shoot_00
;silencer_light_color = 0.6, 0.5, 0.3 ;silencer_light_range = 0.01 ;silencer_light_var_color = 0.05 ;silencer_light_var_range = 0.5 ;silencer_light_time = 0.2
t1.zip When used with SRP_v1.1.4:Optional Features/#2. (Choose From This Folder Last)/Alternative Ballistics it causes crash
Without it merged or getting feedback I can't continue to test Clear Sky support
Sorry, for the long long delay in the review and merge.
There were some uncertainties I wanted to check and it turned out that they were not groundless. I've fixed everything and a bit more!
