1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:49:55 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.cpp

26 lines
762 B
C++

#include "PacketPlayerMiscellaneous.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketPlayerMiscellaneous::PacketPlayerMiscellaneous(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_PLAYER_MISCELLANEOUS;
}
void PacketPlayerMiscellaneous::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
RW(player->miscellaneousChangeType, send);
if (player->miscellaneousChangeType == mwmp::MISCELLANEOUS_CHANGE_TYPE::MARK_LOCATION)
{
RW(player->markCell.mData, send, 1);
RW(player->markCell.mName, send, 1);
RW(player->markPosition.pos, send);
RW(player->markPosition.rot[0], send);
RW(player->markPosition.rot[2], send);
}
}