mirror of
https://github.com/glest/glest-source.git
synced 2025-02-23 03:02:34 +01:00
menu_connected.cpp:use new function to play sfx
https://github.com/ZetaGlest/zetaglest-data/issues/44 (#63)
This commit is contained in:
parent
c0006da18a
commit
92176afd77
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user