openmw-tes3coop/components/openmw-mp/Packets/Player/PacketPosition.cpp

24 lines
556 B
C++

//
// Created by koncord on 05.01.16.
//
#include "PacketPosition.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace std;
using namespace mwmp;
PacketPosition::PacketPosition(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_POS;
priority = MEDIUM_PRIORITY;
//reliability = UNRELIABLE_SEQUENCED;
}
void PacketPosition::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
{
PlayerPacket::Packet(bs, player, send);
RW(player->position, send);
RW(player->direction, send);
}