DarkflameServer/dScripts/ai/ACT/ActPlayerDeathTrigger.cpp
David Markowitz 891648288a Organize Entity header
Probably the third or fourth pass of this darn header...  Just keep making it better every time
Rename some functions to make more sense to a reader
Use different method for Observing/subscribing to component events
Get rid of abomination of overloading GetParentUser
2023-06-16 01:56:02 -07:00

10 lines
343 B
C++

#include "ActPlayerDeathTrigger.h"
#include "Entity.h"
void ActPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
if (!target->IsPlayer() || target->IsDead() || !target->GetPlayerReadyForUpdates()) return; //Don't kill already dead players or players not ready
target->Smash(self->GetObjectID(), eKillType::SILENT);
}