From d79f601d5a62f2291615955fac196dbab5caa15a Mon Sep 17 00:00:00 2001 From: Nounours Heureux Date: Tue, 2 Jun 2015 17:06:18 +0200 Subject: Added HOOK_KILLED --- src/Entities/Entity.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Entities/Entity.cpp') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 108f79e82..500204a98 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -744,6 +744,13 @@ void cEntity::KilledBy(TakeDamageInfo & a_TDI) return; } + // If the victim is a player the hook is handled by the cPlayer class + if (!IsPlayer()) + { + AString emptystring = AString(""); + cRoot::Get()->GetPluginManager()->CallHookKilled(*this, a_TDI, emptystring); + } + // Drop loot: cItems Drops; GetDrops(Drops, a_TDI.Attacker); -- cgit v1.2.3