Open metita opened 5 years ago
You can also add it without editing the .sq file.
Put in CPython class
float m_flSoundDelay;
CPython::Reload( void ) add:
if (DefaultReload( 6, PYTHON_RELOAD, 2.0 ))
{
m_flSoundDelay = gpGlobals->time + 1.5; // Time after it sounds
}
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT ( 10, 15 );```
In CPython::WeaponIdle( void )
add:
if (m_flSoundDelay != 0 && m_flSoundDelay <= gpGlobals->time)
{
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/357_reload1.wav", RANDOM_FLOAT(0.8, 0.9), ATTN_NORM);
m_flSoundDelay = 0;
}
That would cause multiple sounds to play if you're using a model that does have the sound.
Of course it will. I just showed another way how to add it. And you should use ONLY ONE of them.
Half-Life Asset Manager V1.1.0 supports adding events to models without having to decompile and recompile them: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.1.0
Could be useful if the original source files are missing.
This is a well-known old bug, HD Revolver has no reload sound, this should be fixed modifying the .qc file and adding the correct event.
$sequence "reload" "reload" fps 37
---->$sequence "reload" "reload" fps 37 { event 5004 70 "weapons/357_reload1.wav" }
Revolver fixed Revolver source