1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 10:49:57 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Player/PlayerPacket.cpp
Koncord 690211ad99 [General] Extract BaseEvent & BasePlayer from packets to functions
Move Send and Read functions to BasePacket
2017-03-06 18:40:07 +08:00

30 lines
546 B
C++

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