@@ -717,17 +717,30 @@ void CWeaponMagazined::switch2_Empty()
717717void CWeaponMagazined::PlayReloadSound ()
718718{
719719 if (m_sounds_enabled)
720- if (iAmmoElapsed == 0 )
720+ {
721+ #ifdef NEW_SOUNDS // AVO: use custom sounds
722+ if (bMisfire)
721723 {
722- # ifdef NEW_SOUNDS // AVO: custom reload sound
723- if (m_sounds.FindSoundItem (" sndReloadEmpty " , false ))
724- PlaySound (" sndReloadEmpty " , get_LastFP ());
724+ // TODO: make sure correct sound is loaded in CWeaponMagazined::Load(LPCSTR section)
725+ if (m_sounds.FindSoundItem (" sndReloadMisfire " , false ))
726+ PlaySound (" sndReloadMisfire " , get_LastFP ());
725727 else
726- #endif // -NEW_SOUNDS
727728 PlaySound (" sndReload" , get_LastFP ());
728729 }
729730 else
730- PlaySound (" sndReload" , get_LastFP ());
731+ {
732+ if (iAmmoElapsed == 0 )
733+ if (m_sounds.FindSoundItem (" sndReloadEmpty" , false ))
734+ PlaySound (" sndReloadEmpty" , get_LastFP ());
735+ else
736+ PlaySound (" sndReload" , get_LastFP ());
737+ else
738+ PlaySound (" sndReload" , get_LastFP ());
739+ }
740+ #else
741+ PlaySound (" sndReload" , get_LastFP ());
742+ #endif // -AVO
743+ }
731744}
732745
733746void CWeaponMagazined::switch2_Reload ()
@@ -1107,11 +1120,30 @@ void CWeaponMagazined::PlayAnimHide()
11071120
11081121void CWeaponMagazined::PlayAnimReload ()
11091122{
1110- VERIFY (GetState () == eReload);
1111- PlayHUDMotion (" anm_reload" , TRUE , this , GetState ());
1123+ auto state = GetState ();
1124+ VERIFY (state == eReload);
1125+ #ifdef NEW_ANIMS // AVO: use new animations
1126+ if (bMisfire)
1127+ if (isHUDAnimationExist (" anm_reload_misfire" ))
1128+ PlayHUDMotion (" anm_reload_misfire" , true , this , state);
1129+ else
1130+ PlayHUDMotion (" anm_reload" , true , this , state);
1131+ else
1132+ {
1133+ if (iAmmoElapsed == 0 )
1134+ if (isHUDAnimationExist (" anm_reload_empty" ))
1135+ PlayHUDMotion (" anm_reload_empty" , true , this , state);
1136+ else
1137+ PlayHUDMotion (" anm_reload" , true , this , state);
1138+ else
1139+ PlayHUDMotion (" anm_reload" , true , this , state);
1140+ }
1141+ #else
1142+ PlayHUDMotion (" anm_reload" , true , this , state);
1143+ #endif // -NEW_ANIM
11121144}
11131145
1114- void CWeaponMagazined::PlayAnimAim () { PlayHUDMotion (" anm_idle_aim" , TRUE , NULL , GetState ()); }
1146+ void CWeaponMagazined::PlayAnimAim () { PlayHUDMotion (" anm_idle_aim" , true , nullptr , GetState ()); }
11151147void CWeaponMagazined::PlayAnimIdle ()
11161148{
11171149 if (GetState () != eIdle)
0 commit comments