diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index f6e7f6016..a2bda22ab 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -53,6 +53,7 @@ Networking::Networking(RakNet::RakPeerInterface *peer) : mclient(nullptr) playerPacketController->SetStream(0, &bsOut); actorPacketController->SetStream(0, &bsOut); objectPacketController->SetStream(0, &bsOut); + worldstatePacketController->SetStream(0, &bsOut); running = true; exitCode = 0; @@ -74,6 +75,7 @@ Networking::~Networking() delete playerPacketController; delete actorPacketController; delete objectPacketController; + delete worldstatePacketController; } void Networking::setServerPassword(std::string passw) noexcept diff --git a/apps/openmw/mwmp/processors/WorldstateProcessor.cpp b/apps/openmw/mwmp/processors/WorldstateProcessor.cpp index 684e7d355..693241ace 100644 --- a/apps/openmw/mwmp/processors/WorldstateProcessor.cpp +++ b/apps/openmw/mwmp/processors/WorldstateProcessor.cpp @@ -1,6 +1,7 @@ +#include "../Main.hpp" #include "../Networking.hpp" + #include "WorldstateProcessor.hpp" -#include "../Main.hpp" using namespace mwmp; @@ -14,6 +15,8 @@ bool WorldstateProcessor::Process(RakNet::Packet &packet, BaseWorldstate &worlds worldstate.guid = guid; WorldstatePacket *myPacket = Main::get().getNetworking()->getWorldstatePacket(packet.data[0]); + + myPacket->setWorldstate(&worldstate); myPacket->SetReadStream(&bsIn); for (auto &processor : processors)