forked from mirror/openmw-tes3mp
27148ce9eb
Additionally, make it slightly clearer who created which previously existing packets.
27 lines
753 B
C++
27 lines
753 B
C++
#ifndef OPENMW_PROCESSORACTORDEATH_HPP
|
|
#define OPENMW_PROCESSORACTORDEATH_HPP
|
|
|
|
#include "apps/openmw-mp/ActorProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorActorDeath : public ActorProcessor
|
|
{
|
|
public:
|
|
ProcessorActorDeath()
|
|
{
|
|
BPP_INIT(ID_ACTOR_DEATH)
|
|
}
|
|
|
|
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
|
{
|
|
// Send only to players who have the cell loaded
|
|
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
|
|
|
if (serverCell != nullptr && *serverCell->getAuthority() == actorList.guid)
|
|
serverCell->sendToLoaded(&packet, &actorList);
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORACTORDEATH_HPP
|