calling lua function inside an async function causes lots of issues (probably caused by the fact that it runs on a separate thread?), solved by creating a queue of functions to be called on the main thread

This commit is contained in:
Evil Factory
2021-11-08 14:29:07 -03:00
parent 07b6bcc32b
commit 50427390f2
4 changed files with 34 additions and 7 deletions
@@ -1017,6 +1017,7 @@ namespace Barotrauma
SoundManager?.Update();
GameMain.Lua.Update();
GameMain.Lua.hook.Call("think", new object[] { });
Timing.Accumulator -= Timing.Step;