mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 05:49:56 +00:00
27 lines
780 B
C++
27 lines
780 B
C++
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include "PacketDoorDestination.hpp"
|
|
|
|
using namespace mwmp;
|
|
|
|
PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
|
|
{
|
|
packetID = ID_DOOR_DESTINATION;
|
|
hasCellData = true;
|
|
}
|
|
|
|
void PacketDoorDestination::Object(WorldObject &worldObject, bool send)
|
|
{
|
|
ObjectPacket::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);
|
|
}
|
|
}
|