2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 15.01.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
2017-01-20 08:30:50 +00:00
|
|
|
#include "PacketPlayerCellChange.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
|
2017-01-20 08:30:50 +00:00
|
|
|
mwmp::PacketPlayerCellChange::PacketPlayerCellChange(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-01-20 08:30:50 +00:00
|
|
|
packetID = ID_PLAYER_CELL_CHANGE;
|
2016-07-17 19:03:20 +00:00
|
|
|
priority = IMMEDIATE_PRIORITY;
|
|
|
|
reliability = RELIABLE_ORDERED;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void mwmp::PacketPlayerCellChange::Packet(RakNet::BitStream *bs, bool send)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-03-06 09:44:08 +00:00
|
|
|
PlayerPacket::Packet(bs, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2018-07-02 18:50:21 +00:00
|
|
|
RW(player->cell.mData, send, true);
|
|
|
|
RW(player->cell.mName, send, true);
|
2017-06-10 08:43:40 +00:00
|
|
|
|
2018-07-02 18:50:21 +00:00
|
|
|
RW(player->previousCellPosition.pos, send, true);
|
2017-08-04 18:45:52 +00:00
|
|
|
|
2017-06-10 08:43:40 +00:00
|
|
|
RW(player->isChangingRegion, send);
|
|
|
|
|
|
|
|
if (player->isChangingRegion)
|
2018-07-02 18:50:21 +00:00
|
|
|
RW(player->cell.mRegion, send, true);
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|