2018-05-18 03:40:28 +00:00
|
|
|
#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()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-12-04 08:17:33 +00:00
|
|
|
void WorldstatePacket::setWorldstate(BaseWorldstate *newWorldstate)
|
2018-05-18 03:40:28 +00:00
|
|
|
{
|
2019-12-04 08:17:33 +00:00
|
|
|
worldstate = newWorldstate;
|
2018-05-18 03:40:28 +00:00
|
|
|
guid = worldstate->guid;
|
|
|
|
}
|
|
|
|
|
|
|
|
BaseWorldstate *WorldstatePacket::getWorldstate()
|
|
|
|
{
|
|
|
|
return worldstate;
|
|
|
|
}
|