characterdeath

This commit is contained in:
Evil Factory
2021-08-02 21:58:25 -03:00
parent 49d162fb12
commit cdda8a2ffd
3 changed files with 7 additions and 2 deletions

View File

@@ -955,7 +955,8 @@ namespace Barotrauma
{
FileName = filename,
Arguments = arguments,
#if !DEBUG
//#if !DEBUG
#if false
CreateNoWindow = true,
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden

View File

@@ -193,7 +193,7 @@ namespace Barotrauma.Networking
int length = 1 + //(byte)ServerNetObject.CHAT_MESSAGE
2 + //(UInt16)NetStateID
1 + //(byte)Type
Encoding.UTF8.GetBytes(Text).Length + 2;
(Text == null ? 0 : Encoding.UTF8.GetBytes(Text).Length) + 2;
if (SenderClient != null)
{

View File

@@ -3748,6 +3748,10 @@ namespace Barotrauma
GameMain.NetworkMember.CreateEntityEvent(this, new object[] { NetEntityEvent.Type.Status });
}
#if SERVER
GameMain.Lua.hook.Call("characterDeath", new MoonSharp.Interpreter.DynValue[] { MoonSharp.Interpreter.UserData.Create(this) });
#endif
isDead = true;
ApplyStatusEffects(ActionType.OnDeath, 1.0f);