mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 20:42:34 +02:00
menu_connected.cpp:use new function to play sfx
https://github.com/ZetaGlest/zetaglest-data/issues/44 (#63)
This commit is contained in:
@@ -773,31 +773,6 @@ namespace Glest
|
|||||||
return &attentionSound;
|
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 ()
|
StaticSound *CoreData::getHighlightSound ()
|
||||||
{
|
{
|
||||||
int loadAttemptLookupKey = tsyst_COUNT + 7;
|
int loadAttemptLookupKey = tsyst_COUNT + 7;
|
||||||
|
@@ -1217,7 +1217,7 @@ namespace Glest
|
|||||||
if (playServerFoundSound)
|
if (playServerFoundSound)
|
||||||
{
|
{
|
||||||
SoundRenderer::getInstance ().playFx (CoreData::getInstance ().
|
SoundRenderer::getInstance ().playFx (CoreData::getInstance ().
|
||||||
getNewServerSound ());
|
getSound ("PlaySoundNewServer"));
|
||||||
//switch on music again!!
|
//switch on music again!!
|
||||||
Config & config = Config::getInstance ();
|
Config & config = Config::getInstance ();
|
||||||
float configVolume = (config.getInt ("SoundVolumeMusic") / 100.f);
|
float configVolume = (config.getInt ("SoundVolumeMusic") / 100.f);
|
||||||
|
Reference in New Issue
Block a user