Fixed NRE with status effect luahook

This commit is contained in:
EvilFactory
2023-10-19 14:32:17 -03:00
parent 465b800471
commit 3af538bd87

View File

@@ -1565,12 +1565,15 @@ namespace Barotrauma
}
}
foreach (string luaHooks in luaHook)
if (luaHook != null)
{
var result = GameMain.LuaCs.Hook.Call<bool?>(luaHooks, this, deltaTime, entity, targets, worldPosition);
foreach (string luaHooks in luaHook)
{
var result = GameMain.LuaCs.Hook.Call<bool?>(luaHooks, this, deltaTime, entity, targets, worldPosition);
if (result != null && result.Value)
return;
if (result != null && result.Value)
return;
}
}
Hull hull = GetHull(entity);
@@ -2590,4 +2593,4 @@ namespace Barotrauma
return tags.Contains(tag) || tags.Contains(tag);
}
}
}
}