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

Commit 71742ce

Browse files
committed
Add support for non-looping HDFirearm ActiveSound
1 parent 807970f commit 71742ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Entities/HDFirearm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ void HDFirearm::Activate() {
655655

656656
if (!IsReloading()) {
657657
if (m_DeactivationSound && m_DeactivationSound->IsBeingPlayed()) { m_DeactivationSound->FadeOut(); }
658-
if (m_ActiveSound && !m_ActiveSound->IsBeingPlayed()) { m_ActiveSound->Play(this->m_Pos); }
658+
if (m_ActiveSound && !m_ActiveSound->IsBeingPlayed() && (m_ActiveSound->GetLoopSetting() == -1 || !wasActivated)) { m_ActiveSound->Play(this->m_Pos); }
659659
if (m_PreFireSound && !wasActivated && !m_PreFireSound->IsBeingPlayed()) { m_PreFireSound->Play(this->m_Pos); }
660660
}
661661
}

0 commit comments

Comments
 (0)