Move think hook to a better place
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
using Barotrauma.IO;
|
using Barotrauma.IO;
|
||||||
using Barotrauma.Media;
|
using Barotrauma.Media;
|
||||||
using Barotrauma.Networking;
|
using Barotrauma.Networking;
|
||||||
using Barotrauma.Particles;
|
using Barotrauma.Particles;
|
||||||
@@ -922,7 +922,6 @@ namespace Barotrauma
|
|||||||
luaSw.Start();
|
luaSw.Start();
|
||||||
|
|
||||||
GameMain.LuaCs.Update();
|
GameMain.LuaCs.Update();
|
||||||
GameMain.LuaCs.Hook.Call("think");
|
|
||||||
|
|
||||||
luaSw.Stop();
|
luaSw.Stop();
|
||||||
PerformanceCounter.AddElapsedTicks("Think Hook", luaSw.ElapsedTicks);
|
PerformanceCounter.AddElapsedTicks("Think Hook", luaSw.ElapsedTicks);
|
||||||
|
|||||||
@@ -760,8 +760,6 @@ namespace Barotrauma
|
|||||||
compatHookPostfixMethods.Clear();
|
compatHookPostfixMethods.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update() { }
|
|
||||||
|
|
||||||
private Stopwatch performanceMeasurement = new Stopwatch();
|
private Stopwatch performanceMeasurement = new Stopwatch();
|
||||||
|
|
||||||
[MoonSharpHidden]
|
[MoonSharpHidden]
|
||||||
|
|||||||
@@ -198,9 +198,9 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
Hook?.Update();
|
|
||||||
Timer?.Update();
|
Timer?.Update();
|
||||||
Steam?.Update();
|
Steam?.Update();
|
||||||
|
Hook?.Call("think");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
@@ -250,7 +250,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
PrintMessage("Lua! Version " + AssemblyInfo.GitRevision);
|
PrintMessage("Lua! Version " + AssemblyInfo.GitRevision);
|
||||||
|
|
||||||
|
|
||||||
if (File.Exists(configFileName))
|
if (File.Exists(configFileName))
|
||||||
{
|
{
|
||||||
using (var file = File.Open(configFileName, FileMode.Open, FileAccess.Read))
|
using (var file = File.Open(configFileName, FileMode.Open, FileAccess.Read))
|
||||||
|
|||||||
Reference in New Issue
Block a user