From 9a89284bcae2f9368aa5be770e9202bc34c79052 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 25 Apr 2017 23:31:37 +0300 Subject: [PATCH] [Server] Add OnActorCellChange script callback --- apps/openmw-mp/Script/ScriptFunctions.hpp | 1 + apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index afd40011b..206c54c64 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -125,6 +125,7 @@ public: {"OnPlayerSpellbookChange", Function()}, {"OnPlayerJournalChange", Function()}, {"OnActorList", Function()}, + {"OnActorCellChange", Function()}, {"OnActorTest", Function()}, {"OnObjectPlace", Function()}, {"OnObjectDelete", Function()}, diff --git a/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp b/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp index 435e0e048..e3f02128c 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp @@ -17,6 +17,8 @@ namespace mwmp { // Send this to everyone packet.Send(true); + + Script::Call(player.getId(), actorList.cell.getDescription().c_str()); } }; }