DarkflameServer/dScripts/ai/ACT/ActPlayerDeathTrigger.cpp

10 lines
346 B
C++
Raw Normal View History

#include "ActPlayerDeathTrigger.h"
2023-03-08 13:32:03 +00:00
#include "Entity.h"
2022-07-28 13:39:57 +00:00
void ActPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
if (!target->IsPlayer() || target->GetIsDead() || !target->GetPlayerReadyForUpdates()) return; //Don't kill already dead players or players not ready
2022-07-28 13:39:57 +00:00
target->Smash(self->GetObjectID(), eKillType::SILENT);
}