menu_connected.cpp:use new function to play sfx

https://github.com/ZetaGlest/zetaglest-data/issues/44

(#63)
This commit is contained in:
andy5995 2018-02-21 09:12:06 -06:00
parent c0006da18a
commit 92176afd77
No known key found for this signature in database
GPG Key ID: 06BFEC9B82603CAF
2 changed files with 1 additions and 26 deletions

View File

@ -773,31 +773,6 @@ namespace Glest
return &attentionSound;
}
StaticSound *CoreData::getNewServerSound ()
{
int loadAttemptLookupKey = tsyst_COUNT + 6;
if (itemLoadAttempted.find (loadAttemptLookupKey) ==
itemLoadAttempted.end ())
{
itemLoadAttempted[loadAttemptLookupKey] = true;
try
{
static Config & config = Config::getInstance ();
newServerSound.load (config.getString ("PlaySoundNewServer", ""));
}
catch (const megaglest_runtime_error & ex)
{
message (ex.what (),
GlobalStaticFlags::getIsNonGraphicalModeEnabled (),
tempDataLocation);
}
}
return &newServerSound;
}
StaticSound *CoreData::getHighlightSound ()
{
int loadAttemptLookupKey = tsyst_COUNT + 7;

View File

@ -1217,7 +1217,7 @@ namespace Glest
if (playServerFoundSound)
{
SoundRenderer::getInstance ().playFx (CoreData::getInstance ().
getNewServerSound ());
getSound ("PlaySoundNewServer"));
//switch on music again!!
Config & config = Config::getInstance ();
float configVolume = (config.getInt ("SoundVolumeMusic") / 100.f);