2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
#include <PacketPriority.h>
|
|
|
|
#include <RakPeer.h>
|
2016-10-17 12:54:36 +00:00
|
|
|
#include "PlayerPacket.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-10-17 15:47:16 +00:00
|
|
|
PlayerPacket::PlayerPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
|
|
|
packetID = 0;
|
|
|
|
priority = HIGH_PRIORITY;
|
|
|
|
reliability = RELIABLE_ORDERED;
|
2017-05-08 16:38:48 +00:00
|
|
|
orderChannel = CHANNEL_PLAYER;
|
2016-01-12 03:41:44 +00:00
|
|
|
this->peer = peer;
|
|
|
|
}
|
|
|
|
|
2016-10-17 12:54:36 +00:00
|
|
|
PlayerPacket::~PlayerPacket()
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-12-04 08:17:33 +00:00
|
|
|
void PlayerPacket::setPlayer(BasePlayer *newPlayer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2019-12-04 08:17:33 +00:00
|
|
|
player = newPlayer;
|
2017-03-06 09:44:08 +00:00
|
|
|
guid = player->guid;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
BasePlayer *PlayerPacket::getPlayer()
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-03-06 09:44:08 +00:00
|
|
|
return player;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|