new hook call method + function to delegate conversion

This commit is contained in:
Oiltanker
2022-04-15 17:15:45 +03:00
parent 891efb4c4f
commit 3eba20ecb7
39 changed files with 470 additions and 676 deletions
@@ -388,7 +388,7 @@ namespace Barotrauma
AdditionStrength -= amount;
}
#if SERVER
GameMain.LuaCs.HookBase.Call("afflictionUpdate", new object[] { this, characterHealth, targetLimb, deltaTime });
GameMain.LuaCs.Hook.Call("afflictionUpdate", new object[] { this, characterHealth, targetLimb, deltaTime });
#endif
}
@@ -308,7 +308,7 @@ namespace Barotrauma
if (client != null)
{
GameMain.Server.SetClientCharacter(client, husk);
GameMain.LuaCs.HookBase.Call("husk.clientControlHusk", new object[] { client, husk });
GameMain.LuaCs.Hook.Call("husk.clientControlHusk", new object[] { client, husk });
}
#else
if (!character.IsRemotelyControlled && character == Character.Controlled)