openmw-tes3coop/components/openmw-mp/Packets/Worldstate/WorldstatePacket.cpp
2019-02-12 05:20:27 +08:00

32 lines
675 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)
{
worldstate = nullptr;
packetID = 0;
priority = HIGH_PRIORITY;
reliability = RELIABLE_ORDERED;
orderChannel = CHANNEL_WORLDSTATE;
this->peer = peer;
}
WorldstatePacket::~WorldstatePacket()
{
}
void WorldstatePacket::setWorldstate(BaseWorldstate *worldstate)
{
this->worldstate = worldstate;
guid = worldstate->guid;
}
BaseWorldstate *WorldstatePacket::getWorldstate()
{
return worldstate;
}