2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-11 07:07:42 +00:00

Fixes for new boo assert

This commit is contained in:
Jack Andersen
2017-12-02 20:13:04 -10:00
parent 80fcd9d342
commit 92767f5147
3 changed files with 6 additions and 8 deletions

View File

@@ -216,8 +216,7 @@ void CSfxManager::KillAll(ESfxChannels chan)
for (auto it = chanObj.x48_handles.begin() ; it != chanObj.x48_handles.end() ;) for (auto it = chanObj.x48_handles.begin() ; it != chanObj.x48_handles.end() ;)
{ {
const CSfxHandle& handle = *it; const CSfxHandle& handle = *it;
if (handle->IsPlaying()) handle->Stop();
handle->Stop();
handle->Release(); handle->Release();
it = chanObj.x48_handles.erase(it); it = chanObj.x48_handles.erase(it);
} }
@@ -392,8 +391,7 @@ void CSfxManager::StopSound(const CSfxHandle& handle)
if (!handle) if (!handle)
return; return;
m_doUpdate = true; m_doUpdate = true;
if (handle->IsPlaying()) handle->Stop();
handle->Stop();
handle->Release(); handle->Release();
CSfxChannel& chanObj = m_channels[int(m_currentChannel)]; CSfxChannel& chanObj = m_channels[int(m_currentChannel)];
chanObj.x48_handles.erase(handle); chanObj.x48_handles.erase(handle);
@@ -501,8 +499,7 @@ void CSfxManager::StopAndRemoveAllEmitters()
for (auto it = chanObj.x48_handles.begin() ; it != chanObj.x48_handles.end() ;) for (auto it = chanObj.x48_handles.begin() ; it != chanObj.x48_handles.end() ;)
{ {
const CSfxHandle& handle = *it; const CSfxHandle& handle = *it;
if (handle->IsPlaying()) handle->Stop();
handle->Stop();
handle->Release(); handle->Release();
it = chanObj.x48_handles.erase(it); it = chanObj.x48_handles.erase(it);
} }
@@ -708,6 +705,7 @@ void CSfxManager::Update(float dt)
const CSfxHandle& handle = *it; const CSfxHandle& handle = *it;
if (!handle->IsPlaying() && !handle->IsLooped()) if (!handle->IsPlaying() && !handle->IsLooped())
{ {
handle->Stop();
handle->Release(); handle->Release();
m_doUpdate = true; m_doUpdate = true;
it = chanObj.x48_handles.erase(it); it = chanObj.x48_handles.erase(it);

2
amuse

Submodule amuse updated: 89233e98b5...2f4d0e7541

2
hecl

Submodule hecl updated: 9fa4daf596...3afe0163bf