From 40c32c7751caa64239a300c56741c691e48fdeb8 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Wed, 17 Apr 2024 23:56:07 +0200 Subject: [PATCH] Make Settings Menu Better Behaved Around HitSounds --- Classes/ClientSettings.uc | 2 +- Classes/IGPlus_SettingsContent.uc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/ClientSettings.uc b/Classes/ClientSettings.uc index 2b5bd37..535ecb7 100644 --- a/Classes/ClientSettings.uc +++ b/Classes/ClientSettings.uc @@ -171,7 +171,7 @@ simulated function LoadHitSounds() { local int i; for (i = 0; i < arraycount(sHitSound); i++) { - if (sHitSound[i] != "") + if (sHitSound[i] != "" && (sHitSound[i] ~= "none") == false) LoadedHitSound[i] = Sound(DynamicLoadObject(sHitSound[i], class'Sound', true)); else LoadedHitSound[i] = none; diff --git a/Classes/IGPlus_SettingsContent.uc b/Classes/IGPlus_SettingsContent.uc index 286c216..050c8ab 100644 --- a/Classes/IGPlus_SettingsContent.uc +++ b/Classes/IGPlus_SettingsContent.uc @@ -697,7 +697,7 @@ function SetUpHitSoundComboBox(IGPlus_ComboBox Cmb) { Cmb.EditBox.bDelayedNotify = true; Cmb.Clear(); for (i = 0; i < arraycount(Settings.sHitSound); ++i) - Cmb.AddItem(Settings.sHitSound[i], string(i)); + Cmb.AddItem(string(Settings.LoadedHitSound[i]), string(i)); } function SetUpHitSourceComboBox(IGPlus_ComboBox Cmb) {