From 63ef6c82cb05350307f4bab208cda102348c90eb Mon Sep 17 00:00:00 2001 From: jimmyl <70376633+mc-oofert@users.noreply.github.com> Date: Sun, 29 Aug 2021 20:03:37 +0200 Subject: [PATCH] characterdeath with killer and killing affliction why this wasnt already a feature i do not know --- .../BarotraumaServer/ServerSource/Characters/Character.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaServer/ServerSource/Characters/Character.cs b/Barotrauma/BarotraumaServer/ServerSource/Characters/Character.cs index 6fd98ff74..a405200b1 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Characters/Character.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Characters/Character.cs @@ -27,7 +27,7 @@ namespace Barotrauma GameServer.Log(GameServer.CharacterLogName(this) + " has died (Cause of death: " + causeOfDeath + ")", ServerLog.MessageType.Attack); } } - + GameMain.Lua.hook.Call("characterDeath", new MoonSharp.Interpreter.DynValue[] { MoonSharp.Interpreter.UserData.Create(this),MoonSharp.Interpreter.UserData.Create(causeOfDeath.Killer),MoonSharp.Interpreter.UserData.Create(causeOfDeathAffliction) }); healthUpdateTimer = 0.0f; if (CauseOfDeath.Killer != null && CauseOfDeath.Killer.IsTraitor && CauseOfDeath.Killer != this)