From ba8341bfb56ec0d559bf0301fd33814767e3ff87 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 5 Apr 2017 11:02:11 +0300 Subject: [PATCH] [Server] Add SendActorAuthority() script function --- apps/openmw-mp/Script/Functions/World.cpp | 6 ++++++ apps/openmw-mp/Script/Functions/World.hpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/apps/openmw-mp/Script/Functions/World.cpp b/apps/openmw-mp/Script/Functions/World.cpp index a9d339733..9235165c9 100644 --- a/apps/openmw-mp/Script/Functions/World.cpp +++ b/apps/openmw-mp/Script/Functions/World.cpp @@ -277,6 +277,12 @@ void WorldFunctions::SendActorList() noexcept mwmp::Networking::get().getWorldController()->GetPacket(ID_ACTOR_LIST)->Send(scriptEvent.guid); } +void WorldFunctions::SendActorAuthority() noexcept +{ + mwmp::Networking::get().getWorldController()->GetPacket(ID_ACTOR_AUTHORITY)->setEvent(&scriptEvent); + mwmp::Networking::get().getWorldController()->GetPacket(ID_ACTOR_AUTHORITY)->Send(scriptEvent.guid); +} + void WorldFunctions::SendObjectDelete() noexcept { mwmp::Networking::get().getWorldController()->GetPacket(ID_OBJECT_DELETE)->setEvent(&scriptEvent); diff --git a/apps/openmw-mp/Script/Functions/World.hpp b/apps/openmw-mp/Script/Functions/World.hpp index c9caa3506..1eae2b571 100644 --- a/apps/openmw-mp/Script/Functions/World.hpp +++ b/apps/openmw-mp/Script/Functions/World.hpp @@ -52,6 +52,7 @@ {"AddContainerItem", WorldFunctions::AddContainerItem},\ \ {"SendActorList", WorldFunctions::SendActorList},\ + {"SendActorAuthority", WorldFunctions::SendActorAuthority},\ {"SendObjectDelete", WorldFunctions::SendObjectDelete},\ {"SendObjectPlace", WorldFunctions::SendObjectPlace},\ {"SendObjectScale", WorldFunctions::SendObjectScale},\ @@ -118,6 +119,7 @@ public: static void AddContainerItem() noexcept; static void SendActorList() noexcept; + static void SendActorAuthority() noexcept; static void SendObjectDelete() noexcept; static void SendObjectPlace() noexcept; static void SendObjectScale() noexcept;