1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 00:49:54 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Actor/PacketActorDeath.cpp
David Cernat 7ffdb18bf9 [General] Implement ActorDeath packet, part 1
ActorDeath packets are sent for dead actors before their StatsDynamic packets. They contain the actor's deathReason in a manner similar to that of PlayerDeath packets.

A future commit will replace the deathReason with a variable named killer which will be an mwmp::Target.
2018-06-27 21:47:55 +03:00

15 lines
366 B
C++

#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Log.hpp>
#include "PacketActorDeath.hpp"
using namespace mwmp;
PacketActorDeath::PacketActorDeath(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
{
packetID = ID_ACTOR_DEATH;
}
void PacketActorDeath::Actor(BaseActor &actor, bool send)
{
RW(actor.deathReason, send);
}