diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 0d13ce95f..b5779cc21 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 04.01.16. -// - #include #include #include @@ -477,7 +473,7 @@ ObjectList *Networking::getObjectList() return &objectList; } -BaseWorldstate *Networking::getWorldstate() +Worldstate *Networking::getWorldstate() { return &worldstate; } diff --git a/apps/openmw/mwmp/Networking.hpp b/apps/openmw/mwmp/Networking.hpp index fa8a83be8..0f0ce93ec 100644 --- a/apps/openmw/mwmp/Networking.hpp +++ b/apps/openmw/mwmp/Networking.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 04.01.16. -// - #ifndef OPENMW_NETWORKING_HPP #define OPENMW_NETWORKING_HPP @@ -9,8 +5,6 @@ #include #include -#include "ActorList.hpp" -#include "ObjectList.hpp" #include #include @@ -20,6 +14,10 @@ #include +#include "ActorList.hpp" +#include "ObjectList.hpp" +#include "Worldstate.hpp" + namespace mwmp { class LocalPlayer; @@ -47,7 +45,7 @@ namespace mwmp LocalPlayer *getLocalPlayer(); ActorList *getActorList(); ObjectList *getObjectList(); - BaseWorldstate *getWorldstate(); + Worldstate *getWorldstate(); private: bool connected; @@ -62,7 +60,7 @@ namespace mwmp ActorList actorList; ObjectList objectList; - BaseWorldstate worldstate; + Worldstate worldstate; void receiveMessage(RakNet::Packet *packet); diff --git a/apps/openmw/mwmp/Worldstate.cpp b/apps/openmw/mwmp/Worldstate.cpp new file mode 100644 index 000000000..19b171417 --- /dev/null +++ b/apps/openmw/mwmp/Worldstate.cpp @@ -0,0 +1,21 @@ +#include "Worldstate.hpp" +#include "Main.hpp" +#include "Networking.hpp" + +using namespace mwmp; +using namespace std; + +Worldstate::Worldstate() +{ + +} + +Worldstate::~Worldstate() +{ + +} + +Networking *Worldstate::getNetworking() +{ + return mwmp::Main::get().getNetworking(); +} diff --git a/apps/openmw/mwmp/Worldstate.hpp b/apps/openmw/mwmp/Worldstate.hpp new file mode 100644 index 000000000..97b89375d --- /dev/null +++ b/apps/openmw/mwmp/Worldstate.hpp @@ -0,0 +1,22 @@ +#ifndef OPENMW_WORLDSTATE_HPP +#define OPENMW_WORLDSTATE_HPP + +#include + +namespace mwmp +{ + class Networking; + class Worldstate : public BaseWorldstate + { + public: + + Worldstate(); + virtual ~Worldstate(); + + private: + Networking *getNetworking(); + + }; +} + +#endif //OPENMW_WORLDSTATE_HPP