From d778bc3b8a994a4fc1710a0ea69a6372865f24c0 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 26 Jul 2018 20:03:42 +0300 Subject: [PATCH] [Server] Turn readWorldstate and writeWorldstate into static variables --- apps/openmw-mp/Script/Functions/Worldstate.cpp | 5 ++--- apps/openmw-mp/Script/Functions/Worldstate.hpp | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Worldstate.cpp b/apps/openmw-mp/Script/Functions/Worldstate.cpp index 3fb9ffb21..28685577c 100644 --- a/apps/openmw-mp/Script/Functions/Worldstate.cpp +++ b/apps/openmw-mp/Script/Functions/Worldstate.cpp @@ -1,5 +1,4 @@ #include -#include #include #include @@ -11,8 +10,8 @@ using namespace std; using namespace mwmp; -BaseWorldstate *readWorldstate; -BaseWorldstate writeWorldstate; +BaseWorldstate *WorldstateFunctions::readWorldstate; +BaseWorldstate WorldstateFunctions::writeWorldstate; void WorldstateFunctions::ReadReceivedWorldstate() noexcept { diff --git a/apps/openmw-mp/Script/Functions/Worldstate.hpp b/apps/openmw-mp/Script/Functions/Worldstate.hpp index aae7e5885..3728d84a9 100644 --- a/apps/openmw-mp/Script/Functions/Worldstate.hpp +++ b/apps/openmw-mp/Script/Functions/Worldstate.hpp @@ -1,6 +1,7 @@ #ifndef OPENMW_WORLDSTATEAPI_HPP #define OPENMW_WORLDSTATEAPI_HPP +#include #include "../Types.hpp" #define WORLDSTATEAPI \ @@ -61,6 +62,9 @@ class WorldstateFunctions { public: + static mwmp::BaseWorldstate *readWorldstate; + static mwmp::BaseWorldstate writeWorldstate; + /** * \brief Use the last worldstate received by the server as the one being read. *