From 068835ba7170d98758b1913020945305e1e72adc Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 5 Apr 2017 01:18:42 +0300 Subject: [PATCH] [Server] Add OnMpNumIncrement() script callback --- apps/openmw-mp/Networking.cpp | 1 + apps/openmw-mp/Script/ScriptFunctions.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index af69ecfda..54da91af3 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -303,6 +303,7 @@ void Networking::setCurrentMpNum(int value) int Networking::getNextMpNum() { currentMpNum++; + Script::Call(currentMpNum); return currentMpNum; } diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index 59b59e171..fcc5b2e86 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -130,7 +130,8 @@ public: {"OnContainer", Function()}, {"OnPlayerSendMessage", Function()}, {"OnPlayerEndCharGen", Function()}, - {"OnGUIAction", Function()} + {"OnGUIAction", Function()}, + {"OnMpNumIncrement", Function()} }; };