mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-02 21:21:35 +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/NetworkMessages.hpp>
|
||||||
#include <components/openmw-mp/Base/BaseWorldstate.hpp>
|
|
||||||
|
|
||||||
#include <apps/openmw-mp/Networking.hpp>
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
#include <apps/openmw-mp/Player.hpp>
|
#include <apps/openmw-mp/Player.hpp>
|
||||||
|
@ -11,8 +10,8 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace mwmp;
|
using namespace mwmp;
|
||||||
|
|
||||||
BaseWorldstate *readWorldstate;
|
BaseWorldstate *WorldstateFunctions::readWorldstate;
|
||||||
BaseWorldstate writeWorldstate;
|
BaseWorldstate WorldstateFunctions::writeWorldstate;
|
||||||
|
|
||||||
void WorldstateFunctions::ReadReceivedWorldstate() noexcept
|
void WorldstateFunctions::ReadReceivedWorldstate() noexcept
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef OPENMW_WORLDSTATEAPI_HPP
|
#ifndef OPENMW_WORLDSTATEAPI_HPP
|
||||||
#define OPENMW_WORLDSTATEAPI_HPP
|
#define OPENMW_WORLDSTATEAPI_HPP
|
||||||
|
|
||||||
|
#include <components/openmw-mp/Base/BaseWorldstate.hpp>
|
||||||
#include "../Types.hpp"
|
#include "../Types.hpp"
|
||||||
|
|
||||||
#define WORLDSTATEAPI \
|
#define WORLDSTATEAPI \
|
||||||
|
@ -61,6 +62,9 @@ class WorldstateFunctions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
static mwmp::BaseWorldstate *readWorldstate;
|
||||||
|
static mwmp::BaseWorldstate writeWorldstate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Use the last worldstate received by the server as the one being read.
|
* \brief Use the last worldstate received by the server as the one being read.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue