Build 0.18.0.0

This commit is contained in:
Markus Isberg
2022-05-13 00:55:52 +09:00
parent 15d18e6ff6
commit 7547a9b78a
218 changed files with 3881 additions and 2192 deletions
@@ -20,9 +20,9 @@ namespace Barotrauma
{
if (!potentialCallFromConstructor) { return; }
StackTrace st = new StackTrace(skipFrames: 2, fNeedFileInfo: false);
for (int i = st.FrameCount-1; i >= 0; i--)
for (int i = st.FrameCount - 1; i >= 0; i--)
{
if (st.GetFrame(i)?.GetMethod() is {IsConstructor: true, DeclaringType: { } declaringType}
if (st.GetFrame(i)?.GetMethod() is { IsConstructor: true, DeclaringType: { } declaringType }
&& Types.Contains(declaringType))
{
throw new Exception("Called disallowed method from within a prefab's constructor!");