2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 05.01.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "PacketPosition.hpp"
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-10-17 12:54:36 +00:00
|
|
|
PacketPosition::PacketPosition(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2016-09-28 08:45:14 +00:00
|
|
|
packetID = ID_GAME_POS;
|
2016-01-12 03:41:44 +00:00
|
|
|
priority = MEDIUM_PRIORITY;
|
|
|
|
//reliability = UNRELIABLE_SEQUENCED;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PacketPosition::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
|
|
|
{
|
2016-10-17 12:54:36 +00:00
|
|
|
PlayerPacket::Packet(bs, player, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->position, send);
|
|
|
|
RW(player->direction, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|