1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 05:49:56 +00:00
openmw-tes3mp/components/openmw-mp/Packets/World/PacketDoorDestination.cpp

28 lines
778 B
C++
Raw Normal View History

#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketDoorDestination.hpp"
using namespace mwmp;
PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
{
packetID = ID_DOOR_DESTINATION;
hasCellData = true;
}
void PacketDoorDestination::Object(WorldObject &worldObject, bool send)
{
WorldPacket::Object(worldObject, send);
RW(worldObject.teleportState, send);
if (worldObject.teleportState)
{
RW(worldObject.destinationCell.mData, send, 1);
RW(worldObject.destinationCell.mName, send, 1);
RW(worldObject.destinationPosition.pos, send, 1);
RW(worldObject.destinationPosition.rot[0], send, 1);
RW(worldObject.destinationPosition.rot[2], send, 1);
}
}