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

Commit ccbf0b5

Browse files
committed
Fixed immobile sound containers not pausing and resuming when you pause/resume an activity
1 parent 7f2f078 commit ccbf0b5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,8 @@ This can be accessed via the new Lua (R/W) `SettingsMan` property `AIUpdateInter
888888

889889
- Fixed `MOSRotating`s registering all penetrations in one frame even when exceeding gibbing conditions. They now omit all collisions after being flagged for deletion, allowing particles like grenade fragments to penetrate other objects.
890890

891+
- Fixed immobile `SoundContainers` not pausing and resuming when you pause/resume an `Activity`.
892+
891893
</details>
892894

893895
<details><summary><b>Removed</b></summary>

Managers/ActivityMan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace RTE {
328328

329329
m_LastMusicPath = "";
330330
m_LastMusicPos = 0;
331-
g_AudioMan.PauseAllMobileSounds(false);
331+
g_AudioMan.PauseAllSounds(false);
332332

333333
return error;
334334
}
@@ -378,7 +378,7 @@ namespace RTE {
378378

379379
m_Activity->SetPaused(pause);
380380
m_InActivity = !pause;
381-
g_AudioMan.PauseAllMobileSounds(pause);
381+
g_AudioMan.PauseAllSounds(pause);
382382
g_ConsoleMan.PrintString("SYSTEM: Activity \"" + m_Activity->GetPresetName() + "\" was " + (pause ? "paused" : "resumed"));
383383
} else {
384384
g_ConsoleMan.PrintString("ERROR: No Activity to pause!");

Managers/AudioMan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ namespace RTE {
341341
/// Pauses all sound playback.
342342
/// <param name="pause">Whether to pause sounds or resume them.</param>
343343
/// </summary>
344-
void PauseAllMobileSounds(bool pause = true) { if (m_AudioEnabled) { m_MobileSoundChannelGroup->setPaused(pause); } }
344+
void PauseAllSounds(bool pause = true) { if (m_AudioEnabled) { m_MobileSoundChannelGroup->setPaused(pause); m_ImmobileSoundChannelGroup->setPaused(pause); } }
345345
#pragma endregion
346346

347347
#pragma region Lua Sound File Playing

0 commit comments

Comments
 (0)