openmw-tes3coop/components/openmw-mp/Packets/Player/PlayerPacket.cpp

32 lines
581 B
C++
Raw Normal View History

#include <components/openmw-mp/NetworkMessages.hpp>
#include <PacketPriority.h>
#include <RakPeer.h>
2016-10-17 12:54:36 +00:00
#include "PlayerPacket.hpp"
using namespace mwmp;
PlayerPacket::PlayerPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer)
{
packetID = 0;
priority = HIGH_PRIORITY;
reliability = RELIABLE_ORDERED;
orderChannel = CHANNEL_PLAYER;
this->peer = peer;
}
2016-10-17 12:54:36 +00:00
PlayerPacket::~PlayerPacket()
{
}
void PlayerPacket::setPlayer(BasePlayer *player)
{
this->player = player;
guid = player->guid;
}
BasePlayer *PlayerPacket::getPlayer()
{
return player;
}