DarkflameServer/dScripts/ai/ACT/ActPlayerDeathTrigger.cpp

8 lines
325 B
C++
Raw Permalink Normal View History

#include "ActPlayerDeathTrigger.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);
}