openmw-tes3coop/components/openmw-mp/Packets/Actor/PacketActorPosition.cpp
2017-06-03 03:42:10 +08:00

18 lines
450 B
C++

#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Log.hpp>
#include "PacketActorPosition.hpp"
using namespace mwmp;
PacketActorPosition::PacketActorPosition(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
{
packetID = ID_ACTOR_POSITION;
}
void PacketActorPosition::Actor(BaseActor &actor, bool send)
{
RW(actor.position, send, 1);
RW(actor.direction, send, 1);
actor.hasPositionData = true;
}