add an try catch to better see what might be causing this unknown crash,
This commit is contained in:
@@ -1003,11 +1003,10 @@ namespace Barotrauma
|
||||
{
|
||||
Spawner.CreateNetworkEvent(newCharacter, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
GameMain.Lua.hook.Call("characterCreated", new object[] { newCharacter });
|
||||
|
||||
#endif
|
||||
|
||||
return newCharacter;
|
||||
}
|
||||
|
||||
|
||||
@@ -1033,9 +1033,16 @@ namespace Barotrauma
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (queuedFunctionCalls.TryDequeue(out Tuple<object, object[]> result))
|
||||
try
|
||||
{
|
||||
env.CallFunction(result.Item1, result.Item2);
|
||||
if (queuedFunctionCalls.TryDequeue(out Tuple<object, object[]> result))
|
||||
{
|
||||
env.CallFunction(result.Item1, result.Item2);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
env.HandleLuaException(ex, $"queuedFunctionCalls was {queuedFunctionCalls}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user