From 09ea1ab58533745c8a15dba6a2296a98de4832e3 Mon Sep 17 00:00:00 2001 From: uramer Date: Sat, 14 Mar 2020 19:17:00 +0100 Subject: [PATCH] [Server] SetObjectSound --- apps/openmw-mp/Script/Functions/Objects.cpp | 7 +++++++ apps/openmw-mp/Script/Functions/Objects.hpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/apps/openmw-mp/Script/Functions/Objects.cpp b/apps/openmw-mp/Script/Functions/Objects.cpp index e99ce59a4..db5b9c16b 100644 --- a/apps/openmw-mp/Script/Functions/Objects.cpp +++ b/apps/openmw-mp/Script/Functions/Objects.cpp @@ -484,6 +484,13 @@ void ObjectFunctions::SetObjectRotation(double x, double y, double z) noexcept tempObject.position.rot[2] = z; } +void ObjectFunctions::SetObjectSound(const char* soundId, double volume, double pitch) noexcept +{ + tempObject.soundId = soundId; + tempObject.volume = volume; + tempObject.pitch = pitch; +} + void ObjectFunctions::SetObjectSummonState(bool summonState) noexcept { tempObject.isSummon = summonState; diff --git a/apps/openmw-mp/Script/Functions/Objects.hpp b/apps/openmw-mp/Script/Functions/Objects.hpp index da9d9bace..9e3c17236 100644 --- a/apps/openmw-mp/Script/Functions/Objects.hpp +++ b/apps/openmw-mp/Script/Functions/Objects.hpp @@ -102,6 +102,7 @@ {"SetObjectDroppedByPlayerState", ObjectFunctions::SetObjectDroppedByPlayerState},\ {"SetObjectPosition", ObjectFunctions::SetObjectPosition},\ {"SetObjectRotation", ObjectFunctions::SetObjectRotation},\ + {"SetObjectSound", ObjectFunctions::SetObjectSound},\ \ {"SetObjectSummonState", ObjectFunctions::SetObjectSummonState},\ {"SetObjectSummonEffectId", ObjectFunctions::SetObjectSummonEffectId},\ @@ -934,6 +935,8 @@ public: */ static void SetObjectRotation(double x, double y, double z) noexcept; + static void SetObjectSound(const char* soundId, double volume, double pitch) noexcept; + /** * \brief Set the summon state of the temporary object stored on the server. *