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:
parent
c3ff273a22
commit
d778bc3b8a
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue