mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:19:55 +00:00
23 lines
584 B
C++
23 lines
584 B
C++
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||
|
#include "PacketSystemHandshake.hpp"
|
||
|
|
||
|
using namespace mwmp;
|
||
|
|
||
|
PacketSystemHandshake::PacketSystemHandshake(RakNet::RakPeerInterface *peer) : SystemPacket(peer)
|
||
|
{
|
||
|
packetID = ID_SYSTEM_HANDSHAKE;
|
||
|
orderChannel = CHANNEL_SYSTEM;
|
||
|
}
|
||
|
|
||
|
void PacketSystemHandshake::Packet(RakNet::BitStream *bs, bool send)
|
||
|
{
|
||
|
SystemPacket::Packet(bs, send);
|
||
|
|
||
|
if (!RW(system->playerName, send, true, maxNameLength) ||
|
||
|
!RW(system->serverPassword, send, true, maxPasswordLength))
|
||
|
{
|
||
|
packetValid = false;
|
||
|
return;
|
||
|
}
|
||
|
}
|