openmw-tes3coop/components/openmw-mp/Packets/PacketDie.hpp

30 lines
655 B
C++
Raw Normal View History

//
// Created by koncord on 13.01.16.
//
#ifndef OPENMW_PACKETDIE_HPP
#define OPENMW_PACKETDIE_HPP
2016-10-17 12:54:36 +00:00
#include <components/openmw-mp/Packets/PlayerPacket.hpp>
#include <components/openmw-mp/NetworkMessages.hpp>
namespace mwmp
{
2016-10-17 12:54:36 +00:00
class PacketDie: public PlayerPacket
{
public:
2016-10-17 12:54:36 +00:00
PacketDie(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_DIE;
}
void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
{
2016-10-17 12:54:36 +00:00
PlayerPacket::Packet(bs, player, send);
RW(player->CreatureStats()->mDead, send);
}
};
}
#endif //OPENMW_PACKETDIE_HPP