Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit df93462

Browse files
committed
Stop looping FireSounds from playing indefinetly if trigger is held through the reload phase
1 parent da1a261 commit df93462

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Entities/HDFirearm.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ void HDFirearm::Activate() {
619619
if (!IsReloading()) {
620620
if (m_ActiveSound && !m_ActiveSound->IsBeingPlayed()) { m_ActiveSound->Play(this->m_Pos); }
621621
if (m_PreFireSound && !wasActivated && !m_PreFireSound->IsBeingPlayed()) { m_PreFireSound->Play(this->m_Pos); }
622+
if (IsEmpty() && m_FireSound && m_FireSound->GetLoopSetting() == -1 && m_FireSound->IsBeingPlayed()) { m_FireSound->Stop(); }
622623
}
623624
}
624625

0 commit comments

Comments
 (0)