don't crash if SoundMgr is given an invalid index (happens if entities dont define a soundGroup - we need to find a way to prevent the underlying cause.

fixes #203, see also
http://www.wildfiregames.com/forum/index.php?showtopic=11703

This was SVN commit r6132.
This commit is contained in:
janwas 2008-06-28 10:27:04 +00:00
parent f07b780f5f
commit 4d61367fd7

View File

@ -140,5 +140,8 @@ void CSoundGroupMgr::UpdateSoundGroups(float TimeSinceLastFrame)
///////////////////////////////////////////
void CSoundGroupMgr::PlayNext(size_t index, const CVector3D& position)
{
if(index < m_Groups.size())
m_Groups[index]->PlayNext(position);
else
debug_printf("SND: PlayNext(%d) invalid, %d groups defined\n", index, m_Groups.size());
}