diff --git a/src/sound/SI2.cpp b/src/sound/SI2.cpp index 9761393..e5a575a 100644 --- a/src/sound/SI2.cpp +++ b/src/sound/SI2.cpp @@ -235,6 +235,20 @@ bool SI2::IsPlaying(SOUNDKITOBJECT* object) { return object->m_sound->IsPlaying(); } +int32_t SI2::PlaySoundKit(const char *name, int a2, SOUNDKITOBJECT* object, SoundKitProperties* properties) { + if (!SESound::IsInitialized()) { + return 17; + } + + auto id = SI2::GetSoundKitID(name); + + if (!id) { + return 7; + } + + return SI2::PlaySoundKit(id, a2, object, properties, 0, nullptr, 1, 0); +} + int32_t SI2::PlaySoundKit(int32_t id, int32_t a2, SOUNDKITOBJECT* object, SoundKitProperties* properties, int32_t a5, void* a6, int32_t a7, int32_t a8) { // Basic validations diff --git a/src/sound/SI2.hpp b/src/sound/SI2.hpp index d8651a7..5c1519b 100644 --- a/src/sound/SI2.hpp +++ b/src/sound/SI2.hpp @@ -27,6 +27,7 @@ class SI2 { static void InitSoundKitDefs(); static void InitSoundKitGroups(); static bool IsPlaying(SOUNDKITOBJECT* object); + static int32_t PlaySoundKit(const char *name, int a2, SOUNDKITOBJECT* object, SoundKitProperties* properties); static int32_t PlaySoundKit(int32_t id, int32_t a2, SOUNDKITOBJECT* object, SoundKitProperties* properties, int32_t a5, void* a6, int32_t a7, int32_t a8); static void PlayUISound(int32_t id); static void RegisterCVars();