You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3coop/components/openmw-mp/Packets/PacketAttack.cpp

30 lines
790 B
C++

//
// Created by koncord on 13.01.16.
//
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketAttack.hpp"
using namespace mwmp;
PacketAttack::PacketAttack(RakNet::RakPeerInterface *peer) : BasePacket(peer)
{
packetID = ID_GAME_ATTACK;
}
void PacketAttack::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
{
BasePacket::Packet(bs, player, send);
RW(player->GetAttack()->attacker, send);
RW(player->GetAttack()->target, send);
RW(player->GetAttack()->refid, send);
RW(player->GetAttack()->type, send);
RW(player->GetAttack()->success, send);
RW(player->GetAttack()->damage, send);
//
RW(player->GetAttack()->pressed, send);
RW(player->GetAttack()->knockdown, send);
RW(player->GetAttack()->block, send);
}