From a5c21895362d07dcda9736e2ba264424822d5f82 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Wed, 26 Nov 2025 19:01:08 -0600 Subject: [PATCH] feat(sound): use SOUNDKITOBJECT in SI2::PlaySoundKit --- src/sound/SI2.cpp | 7 ++++--- src/sound/SI2.hpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sound/SI2.cpp b/src/sound/SI2.cpp index 5663e38..9761393 100644 --- a/src/sound/SI2.cpp +++ b/src/sound/SI2.cpp @@ -235,7 +235,7 @@ bool SI2::IsPlaying(SOUNDKITOBJECT* object) { return object->m_sound->IsPlaying(); } -int32_t SI2::PlaySoundKit(int32_t id, int32_t a2, void* handle, SoundKitProperties* properties, int32_t a5, void* a6, int32_t a7, int32_t a8) { +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 if (id <= 0) { @@ -324,8 +324,9 @@ int32_t SI2::PlaySoundKit(int32_t id, int32_t a2, void* handle, SoundKitProperti SESound* sound; - if (handle) { - // TODO sound = handle->sound; + if (object) { + sound = object->m_sound; + // TODO } else { SESound newSound = {}; diff --git a/src/sound/SI2.hpp b/src/sound/SI2.hpp index 9af5882..d8651a7 100644 --- a/src/sound/SI2.hpp +++ b/src/sound/SI2.hpp @@ -27,7 +27,7 @@ class SI2 { static void InitSoundKitDefs(); static void InitSoundKitGroups(); static bool IsPlaying(SOUNDKITOBJECT* object); - static int32_t PlaySoundKit(int32_t id, int32_t a2, void* handle, SoundKitProperties* properties, int32_t a5, void* a6, int32_t a7, int32_t a8); + 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(); static void RegisterUserCVars();