From af0dc46b3110c28ecdfe9b84a3e20c8a975b1ee5 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 10 Oct 2020 11:46:43 +0200 Subject: [PATCH] Fix SoundAliasCustom loading for IW4 actually being loaded like const char** --- src/ZoneCode/Game/IW4/IW4_Commands.txt | 6 +++++- src/ZoneCommon/Game/IW4/IW4_Assets.h | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ZoneCode/Game/IW4/IW4_Commands.txt b/src/ZoneCode/Game/IW4/IW4_Commands.txt index 7cfa981a..0003c457 100644 --- a/src/ZoneCode/Game/IW4/IW4_Commands.txt +++ b/src/ZoneCode/Game/IW4/IW4_Commands.txt @@ -568,9 +568,13 @@ reorder: // SndAliasCustom use SndAliasCustom; -set string soundName; +set count name 1; +set reusable name; set condition sound never; +// snd_alias_list_name +set string snd_alias_list_name::soundName; + // ========================================= // MenuList // ========================================= diff --git a/src/ZoneCommon/Game/IW4/IW4_Assets.h b/src/ZoneCommon/Game/IW4/IW4_Assets.h index b41a5606..6383bac8 100644 --- a/src/ZoneCommon/Game/IW4/IW4_Assets.h +++ b/src/ZoneCommon/Game/IW4/IW4_Assets.h @@ -2278,9 +2278,14 @@ namespace IW4 MISSILE_GUIDANCE_COUNT }; - union SndAliasCustom + struct snd_alias_list_name { const char* soundName; + }; + + union SndAliasCustom + { + snd_alias_list_name* name; snd_alias_list_t* sound; };