mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 20:45:32 +00:00
ac374a8ef9
Conflicts: apps/openmw-mp/Player.cpp apps/openmw-mp/Script/Functions/Mechanics.cpp apps/openmw-mp/Script/Functions/Mechanics.hpp apps/openmw-mp/Script/Functions/Quests.cpp apps/openmw-mp/Script/Functions/Quests.hpp apps/openmw-mp/Script/ScriptFunctions.hpp apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp apps/openmw/mwmp/LocalPlayer.hpp apps/openmw/mwmp/WorldEvent.cpp apps/openmw/mwworld/worldimp.cpp components/openmw-mp/Base/BasePlayer.hpp
31 lines
929 B
C++
31 lines
929 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);
|
|
|
|
switch (player->miscellaneousChangeType)
|
|
{
|
|
case MiscellaneousChangeType::MarkLocation:
|
|
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);
|
|
break;
|
|
case MiscellaneousChangeType::SelectedSpell:
|
|
RW(player->selectedSpellId, send, 1);
|
|
break;
|
|
}
|
|
}
|