fixed amb728 (menu sounds are now precached)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401264
This commit is contained in:
David Anderson 2007-08-03 11:14:56 +00:00
parent 01c0942ad2
commit e37a7bcbbe
2 changed files with 17 additions and 0 deletions

View File

@ -891,3 +891,19 @@ const char *MenuManager::GetMenuSound(ItemSelection sel)
return sound;
}
void MenuManager::OnSourceModLevelChange(const char *mapName)
{
if (m_SelectSound.size() > 0)
{
enginesound->PrecacheSound(m_SelectSound.c_str(), true);
}
if (m_ExitBackSound.size() > 0)
{
enginesound->PrecacheSound(m_ExitBackSound.c_str(), true);
}
if (m_ExitSound.size() > 0)
{
enginesound->PrecacheSound(m_ExitSound.c_str(), true);
}
}

View File

@ -96,6 +96,7 @@ public: //SMGlobalClass
ConfigSource source,
char *error,
size_t maxlength);
void OnSourceModLevelChange(const char *mapName);
public: //IMenuManager
virtual const char *GetInterfaceName()
{