2018-01-29 20:32:51 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
#include "PacketDoorDestination.hpp"
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2018-05-12 16:40:00 +00:00
|
|
|
PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
|
|
|
packetID = ID_DOOR_DESTINATION;
|
|
|
|
hasCellData = true;
|
|
|
|
}
|
|
|
|
|
2018-05-12 21:42:24 +00:00
|
|
|
void PacketDoorDestination::Object(BaseObject &baseObject, bool send)
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
2018-05-12 21:42:24 +00:00
|
|
|
ObjectPacket::Object(baseObject, send);
|
2018-04-29 19:32:22 +00:00
|
|
|
|
2018-05-12 21:42:24 +00:00
|
|
|
RW(baseObject.teleportState, send);
|
2018-04-29 19:32:22 +00:00
|
|
|
|
2018-05-12 21:42:24 +00:00
|
|
|
if (baseObject.teleportState)
|
2018-04-29 19:32:22 +00:00
|
|
|
{
|
2018-07-02 18:50:21 +00:00
|
|
|
RW(baseObject.destinationCell.mData, send, true);
|
|
|
|
RW(baseObject.destinationCell.mName, send, true);
|
2018-04-29 19:32:22 +00:00
|
|
|
|
2018-07-02 18:50:21 +00:00
|
|
|
RW(baseObject.destinationPosition.pos, send, true);
|
|
|
|
RW(baseObject.destinationPosition.rot[0], send, true);
|
|
|
|
RW(baseObject.destinationPosition.rot[2], send, true);
|
2018-04-29 19:32:22 +00:00
|
|
|
}
|
2018-01-29 20:32:51 +00:00
|
|
|
}
|