forked from teamnwah/openmw-tes3coop
37 lines
No EOL
722 B
C++
37 lines
No EOL
722 B
C++
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include <PacketPriority.h>
|
|
#include <RakPeer.h>
|
|
#include "BasePacket.hpp"
|
|
|
|
using namespace mwmp;
|
|
|
|
BasePacket::BasePacket(RakNet::RakPeerInterface *peer)
|
|
{
|
|
packetID = 0;
|
|
priority = HIGH_PRIORITY;
|
|
reliability = RELIABLE_ORDERED;
|
|
this->peer = peer;
|
|
}
|
|
|
|
BasePacket::~BasePacket()
|
|
{
|
|
|
|
}
|
|
|
|
void BasePacket::SetReadStream(RakNet::BitStream *bitStream)
|
|
{
|
|
bsRead = bitStream;
|
|
}
|
|
|
|
void BasePacket::SetSendStream(RakNet::BitStream *bitStream)
|
|
{
|
|
bsSend = bitStream;
|
|
}
|
|
|
|
void BasePacket::SetStreams(RakNet::BitStream *inStream, RakNet::BitStream *outStream)
|
|
{
|
|
if (inStream != 0)
|
|
bsRead = inStream;
|
|
if (outStream != 0)
|
|
bsSend = outStream;
|
|
} |