2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

Various bug fixes

This commit is contained in:
Jack Andersen
2018-06-01 20:06:25 -10:00
parent 56a5cfd115
commit 357a7efa9a
16 changed files with 90 additions and 65 deletions

View File

@@ -217,6 +217,7 @@ void CSfxManager::KillAll(ESfxChannels chan)
const CSfxHandle& handle = *it;
handle->Stop();
handle->Release();
handle->Close();
it = chanObj.x48_handles.erase(it);
}
}
@@ -248,6 +249,7 @@ void CSfxManager::TurnOffChannel(ESfxChannels chan)
else
{
handle->Stop();
handle->Close();
it = chanObj.x48_handles.erase(it);
continue;
}
@@ -260,6 +262,7 @@ void CSfxManager::TurnOffChannel(ESfxChannels chan)
if (!handle->IsLooped())
{
handle->Release();
handle->Close();
it = chanObj.x48_handles.erase(it);
continue;
}
@@ -393,6 +396,7 @@ void CSfxManager::StopSound(const CSfxHandle& handle)
handle->Stop();
handle->Release();
CSfxChannel& chanObj = m_channels[int(m_currentChannel)];
handle->Close();
chanObj.x48_handles.erase(handle);
}
@@ -500,6 +504,7 @@ void CSfxManager::StopAndRemoveAllEmitters()
const CSfxHandle& handle = *it;
handle->Stop();
handle->Release();
handle->Close();
it = chanObj.x48_handles.erase(it);
}
}
@@ -646,6 +651,7 @@ void CSfxManager::Update(float dt)
{
handle->Stop();
m_doUpdate = true;
handle->Close();
it = chanObj.x48_handles.erase(it);
continue;
}
@@ -675,6 +681,7 @@ void CSfxManager::Update(float dt)
if (handle->IsPlaying())
{
handle->Stop();
handle->Close();
chanObj.x48_handles.erase(handle);
}
}
@@ -684,6 +691,7 @@ void CSfxManager::Update(float dt)
if (handle->IsPlaying() && !handle->IsInArea())
{
handle->Stop();
handle->Close();
chanObj.x48_handles.erase(handle);
}
}
@@ -707,6 +715,7 @@ void CSfxManager::Update(float dt)
handle->Stop();
handle->Release();
m_doUpdate = true;
handle->Close();
it = chanObj.x48_handles.erase(it);
continue;
}