Move menu sound selection from core config to gamedata. (#1896)

This commit is contained in:
Nicholas Hastings
2022-12-29 04:10:51 +00:00
committed by GitHub
parent 2130c60fd9
commit b0799d3336
6 changed files with 68 additions and 58 deletions
+4 -4
View File
@@ -311,9 +311,9 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
clients[0] = client;
filter.Initialize(clients, 1);
const char *sound = g_Menus.GetMenuSound(type);
std::string *sound = g_Menus.GetMenuSound(type);
if (sound != NULL)
if (nullptr != sound && !sound->empty())
{
edict_t *pEdict = PEntityOfEntIndex(client);
if (pEdict)
@@ -327,10 +327,10 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
client,
CHAN_AUTO,
#if SOURCE_ENGINE >= SE_PORTAL2
sound,
sound->c_str(),
-1,
#endif
sound,
sound->c_str(),
VOL_NORM,
ATTN_NORM,
#if SOURCE_ENGINE >= SE_PORTAL2