Skip to content

An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.

C++
604 B
Raw Blame
#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 *newBitstream, bool send)
{
    SystemPacket::Packet(newBitstream, send);

    if (!RW(system->playerName, send, true, maxNameLength) ||
        !RW(system->serverPassword, send, true, maxPasswordLength))
    {
        packetValid = false;
        return;
    }
}