openmw-tes3coop/components/openmw-mp/Packets/Player/PlayerPacket.cpp
Koncord 2cb0ea20f0 [General] Modernize packets
Use explicit for constructors
Use override instead virtual for inherited methods
Mark final derived classes as "final"
2017-12-09 10:13:27 +08:00

26 lines
545 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;
orderChannel = CHANNEL_PLAYER;
this->peer = peer;
}
void PlayerPacket::setPlayer(BasePlayer *player)
{
this->player = player;
guid = player->guid;
}
BasePlayer *PlayerPacket::getPlayer()
{
return player;
}