forgot to include a file in the last commit (ed1fbdbe5)
This commit is contained in:
@@ -89,10 +89,7 @@ namespace Barotrauma
|
|||||||
private static void _hookLuaCsPatch(MethodBase __originalMethod, object[] __args, object __instance, out object result, HookMethodType hookMethodType)
|
private static void _hookLuaCsPatch(MethodBase __originalMethod, object[] __args, object __instance, out object result, HookMethodType hookMethodType)
|
||||||
{
|
{
|
||||||
result = null;
|
result = null;
|
||||||
#if CLIENT
|
|
||||||
if (GameMain.GameSession?.IsRunning == false && GameMain.IsSingleplayer && GameMain.MainThread != Thread.CurrentThread)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var funcAddr = ((long)__originalMethod.MethodHandle.GetFunctionPointer());
|
var funcAddr = ((long)__originalMethod.MethodHandle.GetFunctionPointer());
|
||||||
@@ -378,10 +375,6 @@ namespace Barotrauma
|
|||||||
[MoonSharpHidden]
|
[MoonSharpHidden]
|
||||||
public T Call<T>(string name, params object[] args)
|
public T Call<T>(string name, params object[] args)
|
||||||
{
|
{
|
||||||
#if CLIENT
|
|
||||||
if (GameMain.GameSession?.IsRunning == false && GameMain.IsSingleplayer && GameMain.MainThread != Thread.CurrentThread)
|
|
||||||
return default(T);
|
|
||||||
#endif
|
|
||||||
if (GameMain.LuaCs == null) return default(T);
|
if (GameMain.LuaCs == null) return default(T);
|
||||||
if (name == null) return default(T);
|
if (name == null) return default(T);
|
||||||
if (args == null) { args = new object[] { }; }
|
if (args == null) { args = new object[] { }; }
|
||||||
|
|||||||
Reference in New Issue
Block a user