1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 15:19:55 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Worldstate/WorldstatePacket.cpp

31 lines
649 B
C++

#include <components/openmw-mp/NetworkMessages.hpp>
#include <PacketPriority.h>
#include <RakPeer.h>
#include "WorldstatePacket.hpp"
using namespace mwmp;
WorldstatePacket::WorldstatePacket(RakNet::RakPeerInterface *peer) : BasePacket(peer)
{
packetID = 0;
priority = HIGH_PRIORITY;
reliability = RELIABLE_ORDERED;
orderChannel = CHANNEL_WORLDSTATE;
this->peer = peer;
}
WorldstatePacket::~WorldstatePacket()
{
}
void WorldstatePacket::setWorldstate(BaseWorldstate *newWorldstate)
{
worldstate = newWorldstate;
guid = worldstate->guid;
}
BaseWorldstate *WorldstatePacket::getWorldstate()
{
return worldstate;
}