forked from mirror/openmw-tes3mp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
914 B
C++
29 lines
914 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, true);
|
|
RW(player->markCell.mName, send, true);
|
|
|
|
RW(player->markPosition.pos, send);
|
|
RW(player->markPosition.rot[0], send);
|
|
RW(player->markPosition.rot[2], send);
|
|
}
|
|
else if (player->miscellaneousChangeType == mwmp::MISCELLANEOUS_CHANGE_TYPE::SELECTED_SPELL)
|
|
RW(player->selectedSpellId, send, true);
|
|
}
|