2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 05.01.16.
|
|
|
|
//
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
#include "PacketPlayerPosition.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
PacketPlayerPosition::PacketPlayerPosition(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-04-25 19:11:33 +00:00
|
|
|
packetID = ID_PLAYER_POSITION;
|
2016-01-12 03:41:44 +00:00
|
|
|
priority = MEDIUM_PRIORITY;
|
|
|
|
//reliability = UNRELIABLE_SEQUENCED;
|
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void PacketPlayerPosition::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-21 16:27:36 +00:00
|
|
|
RW(player->position, send, 1);
|
|
|
|
RW(player->direction, send, 1);
|
2017-01-26 04:17:29 +00:00
|
|
|
}
|