1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-27 09:39:40 +00:00

[Server] Turn readWorldstate and writeWorldstate into static variables

This commit is contained in:
David Cernat 2018-07-26 20:03:42 +03:00
parent c3ff273a22
commit d778bc3b8a
2 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,4 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Base/BaseWorldstate.hpp>
#include <apps/openmw-mp/Networking.hpp>
#include <apps/openmw-mp/Player.hpp>
@ -11,8 +10,8 @@
using namespace std;
using namespace mwmp;
BaseWorldstate *readWorldstate;
BaseWorldstate writeWorldstate;
BaseWorldstate *WorldstateFunctions::readWorldstate;
BaseWorldstate WorldstateFunctions::writeWorldstate;
void WorldstateFunctions::ReadReceivedWorldstate() noexcept
{

View file

@ -1,6 +1,7 @@
#ifndef OPENMW_WORLDSTATEAPI_HPP
#define OPENMW_WORLDSTATEAPI_HPP
#include <components/openmw-mp/Base/BaseWorldstate.hpp>
#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.
*