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);
|
Spawner.CreateNetworkEvent(newCharacter, false);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
GameMain.Lua.hook.Call("characterCreated", new object[] { newCharacter });
|
GameMain.Lua.hook.Call("characterCreated", new object[] { newCharacter });
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return newCharacter;
|
return newCharacter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1032,12 +1032,19 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (queuedFunctionCalls.TryDequeue(out Tuple<object, object[]> result))
|
if (queuedFunctionCalls.TryDequeue(out Tuple<object, object[]> result))
|
||||||
{
|
{
|
||||||
env.CallFunction(result.Item1, result.Item2);
|
env.CallFunction(result.Item1, result.Item2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
env.HandleLuaException(ex, $"queuedFunctionCalls was {queuedFunctionCalls}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public object Call(string name, params object[] args)
|
public object Call(string name, params object[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user