[General] Fix Worldstate packets by adding missing lines

pull/434/head
David Cernat 7 years ago
parent 815d17d9db
commit e87e1dbb30

@ -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

@ -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)

Loading…
Cancel
Save