using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GDWeave;
using GDWeave.Godot;
using GDWeave.Godot.Variants;
using GDWeave.Modding;
using hideri.SmoothCam.Patches;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("hideri.SmoothCam")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: AssemblyProduct("hideri.SmoothCam")]
[assembly: AssemblyTitle("hideri.SmoothCam")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace hideri.SmoothCam
{
public class Config
{
}
public class Mod : IMod, global::System.IDisposable
{
public static IModInterface _inteface;
private readonly Config _config;
public Mod(IModInterface modInterface)
{
_inteface = modInterface;
_config = modInterface.ReadConfig<Config>();
modInterface.Logger.Information("[SmoothCam] Pre-patching Player...");
modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerPreFixer());
modInterface.Logger.Information("[SmoothCam] Patching Player...");
modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerFixer());
modInterface.Logger.Information("[SmoothCam] Patching Tail...");
modInterface.RegisterScriptMod((IScriptMod)(object)new TailFixer());
}
public void Dispose()
{
}
}
}
namespace hideri.SmoothCam.Patches
{
public class PlayerFixer : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__2 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
{
private int <>1__state;
private Token <>2__current;
private int <>l__initialThreadId;
private string path;
public string <>3__path;
private global::System.Collections.Generic.IEnumerable<Token> tokens;
public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;
public PlayerFixer <>4__this;
private MultiTokenWaiter <_process_Waiter>5__1;
private MultiTokenWaiter <_rot_speed_Waiter>5__2;
private MultiTokenWaiter <_gravity_snap_Waiter>5__3;
private MultiTokenWaiter <_camera_fov_Waiter>5__4;
private global::System.Collections.Generic.IEnumerator<Token> <>s__5;
private Token <token>5__6;
Token global::System.Collections.Generic.IEnumerator<Token>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object global::System.Collections.IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Modify>d__2(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void global::System.IDisposable.Dispose()
{
int num = <>1__state;
if (num != -3 && (uint)(num - 1) > 70u)
{
return;
}
try
{
}
finally
{
<>m__Finally1();
}
}
private bool MoveNext()
{
//IL_09b7: Unknown result type (might be due to invalid IL or missing references)
//IL_09c1: Expected O, but got Unknown
//IL_09e3: Unknown result type (might be due to invalid IL or missing references)
//IL_09ed: Expected O, but got Unknown
//IL_0a09: Unknown result type (might be due to invalid IL or missing references)
//IL_0a13: Expected O, but got Unknown
//IL_0a34: Unknown result type (might be due to invalid IL or missing references)
//IL_0a3e: Expected O, but got Unknown
//IL_0a5a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a64: Expected O, but got Unknown
//IL_0a86: Unknown result type (might be due to invalid IL or missing references)
//IL_0a90: Expected O, but got Unknown
//IL_0aac: Unknown result type (might be due to invalid IL or missing references)
//IL_0ab6: Expected O, but got Unknown
//IL_0ad8: Unknown result type (might be due to invalid IL or missing references)
//IL_0ae2: Expected O, but got Unknown
//IL_0aff: Unknown result type (might be due to invalid IL or missing references)
//IL_0b09: Expected O, but got Unknown
//IL_0b2c: Unknown result type (might be due to invalid IL or missing references)
//IL_0b36: Expected O, but got Unknown
//IL_0b53: Unknown result type (might be due to invalid IL or missing references)
//IL_0b5d: Expected O, but got Unknown
//IL_0b80: Unknown result type (might be due to invalid IL or missing references)
//IL_0b8a: Expected O, but got Unknown
//IL_0baa: Unknown result type (might be due to invalid IL or missing references)
//IL_0bb4: Expected O, but got Unknown
//IL_0bd7: Unknown result type (might be due to invalid IL or missing references)
//IL_0be1: Expected O, but got Unknown
//IL_0bfe: Unknown result type (might be due to invalid IL or missing references)
//IL_0c08: Expected O, but got Unknown
//IL_0c2a: Unknown result type (might be due to invalid IL or missing references)
//IL_0c34: Expected O, but got Unknown
//IL_0c51: Unknown result type (might be due to invalid IL or missing references)
//IL_0c5b: Expected O, but got Unknown
//IL_0c7e: Unknown result type (might be due to invalid IL or missing references)
//IL_0c88: Expected O, but got Unknown
//IL_0ca5: Unknown result type (might be due to invalid IL or missing references)
//IL_0caf: Expected O, but got Unknown
//IL_0cd2: Unknown result type (might be due to invalid IL or missing references)
//IL_0cdc: Expected O, but got Unknown
//IL_0cf9: Unknown result type (might be due to invalid IL or missing references)
//IL_0d03: Expected O, but got Unknown
//IL_0d26: Unknown result type (might be due to invalid IL or missing references)
//IL_0d30: Expected O, but got Unknown
//IL_0d53: Unknown result type (might be due to invalid IL or missing references)
//IL_0d5d: Expected O, but got Unknown
//IL_0d7d: Unknown result type (might be due to invalid IL or missing references)
//IL_0d87: Expected O, but got Unknown
//IL_0e14: Unknown result type (might be due to invalid IL or missing references)
//IL_0e1e: Expected O, but got Unknown
//IL_0e41: Unknown result type (might be due to invalid IL or missing references)
//IL_0e4b: Expected O, but got Unknown
//IL_0e6d: Unknown result type (might be due to invalid IL or missing references)
//IL_0e77: Expected O, but got Unknown
//IL_0e72: Unknown result type (might be due to invalid IL or missing references)
//IL_0e7c: Expected O, but got Unknown
//IL_0e9f: Unknown result type (might be due to invalid IL or missing references)
//IL_0ea9: Expected O, but got Unknown
//IL_0ecb: Unknown result type (might be due to invalid IL or missing references)
//IL_0ed5: Expected O, but got Unknown
//IL_0ed0: Unknown result type (might be due to invalid IL or missing references)
//IL_0eda: Expected O, but got Unknown
//IL_0efd: Unknown result type (might be due to invalid IL or missing references)
//IL_0f07: Expected O, but got Unknown
//IL_0f2a: Unknown result type (might be due to invalid IL or missing references)
//IL_0f34: Expected O, but got Unknown
//IL_0f51: Unknown result type (might be due to invalid IL or missing references)
//IL_0f5b: Expected O, but got Unknown
//IL_0f7d: Unknown result type (might be due to invalid IL or missing references)
//IL_0f87: Expected O, but got Unknown
//IL_0fa4: Unknown result type (might be due to invalid IL or missing references)
//IL_0fae: Expected O, but got Unknown
//IL_0fd1: Unknown result type (might be due to invalid IL or missing references)
//IL_0fdb: Expected O, but got Unknown
//IL_0ff8: Unknown result type (might be due to invalid IL or missing references)
//IL_1002: Expected O, but got Unknown
//IL_1025: Unknown result type (might be due to invalid IL or missing references)
//IL_102f: Expected O, but got Unknown
//IL_1051: Unknown result type (might be due to invalid IL or missing references)
//IL_105b: Expected O, but got Unknown
//IL_1056: Unknown result type (might be due to invalid IL or missing references)
//IL_1060: Expected O, but got Unknown
//IL_1100: Unknown result type (might be due to invalid IL or missing references)
//IL_110a: Expected O, but got Unknown
//IL_112d: Unknown result type (might be due to invalid IL or missing references)
//IL_1137: Expected O, but got Unknown
//IL_1154: Unknown result type (might be due to invalid IL or missing references)
//IL_115e: Expected O, but got Unknown
//IL_1181: Unknown result type (might be due to invalid IL or missing references)
//IL_118b: Expected O, but got Unknown
//IL_11ad: Unknown result type (might be due to invalid IL or missing references)
//IL_11b7: Expected O, but got Unknown
//IL_11b2: Unknown result type (might be due to invalid IL or missing references)
//IL_11bc: Expected O, but got Unknown
//IL_11df: Unknown result type (might be due to invalid IL or missing references)
//IL_11e9: Expected O, but got Unknown
//IL_1206: Unknown result type (might be due to invalid IL or missing references)
//IL_1210: Expected O, but got Unknown
//IL_1232: Unknown result type (might be due to invalid IL or missing references)
//IL_123c: Expected O, but got Unknown
//IL_1259: Unknown result type (might be due to invalid IL or missing references)
//IL_1263: Expected O, but got Unknown
//IL_1286: Unknown result type (might be due to invalid IL or missing references)
//IL_1290: Expected O, but got Unknown
//IL_12ad: Unknown result type (might be due to invalid IL or missing references)
//IL_12b7: Expected O, but got Unknown
//IL_12da: Unknown result type (might be due to invalid IL or missing references)
//IL_12e4: Expected O, but got Unknown
//IL_1306: Unknown result type (might be due to invalid IL or missing references)
//IL_1310: Expected O, but got Unknown
//IL_130b: Unknown result type (might be due to invalid IL or missing references)
//IL_1315: Expected O, but got Unknown
//IL_1338: Unknown result type (might be due to invalid IL or missing references)
//IL_1342: Expected O, but got Unknown
//IL_13c7: Unknown result type (might be due to invalid IL or missing references)
//IL_13d1: Expected O, but got Unknown
//IL_13cc: Unknown result type (might be due to invalid IL or missing references)
//IL_13d6: Expected O, but got Unknown
//IL_13f9: Unknown result type (might be due to invalid IL or missing references)
//IL_1403: Expected O, but got Unknown
//IL_1420: Unknown result type (might be due to invalid IL or missing references)
//IL_142a: Expected O, but got Unknown
//IL_144d: Unknown result type (might be due to invalid IL or missing references)
//IL_1457: Expected O, but got Unknown
//IL_1474: Unknown result type (might be due to invalid IL or missing references)
//IL_147e: Expected O, but got Unknown
//IL_14a1: Unknown result type (might be due to invalid IL or missing references)
//IL_14ab: Expected O, but got Unknown
//IL_14ce: Unknown result type (might be due to invalid IL or missing references)
//IL_14d8: Expected O, but got Unknown
//IL_14fb: Unknown result type (might be due to invalid IL or missing references)
//IL_1505: Expected O, but got Unknown
//IL_1528: Unknown result type (might be due to invalid IL or missing references)
//IL_1532: Expected O, but got Unknown
//IL_1555: Unknown result type (might be due to invalid IL or missing references)
//IL_155f: Expected O, but got Unknown
//IL_1581: Unknown result type (might be due to invalid IL or missing references)
//IL_158b: Expected O, but got Unknown
//IL_1586: Unknown result type (might be due to invalid IL or missing references)
//IL_1590: Expected O, but got Unknown
//IL_15b3: Unknown result type (might be due to invalid IL or missing references)
//IL_15bd: Expected O, but got Unknown
//IL_15df: Unknown result type (might be due to invalid IL or missing references)
//IL_15e9: Expected O, but got Unknown
//IL_15e4: Unknown result type (might be due to invalid IL or missing references)
//IL_15ee: Expected O, but got Unknown
//IL_1611: Unknown result type (might be due to invalid IL or missing references)
//IL_161b: Expected O, but got Unknown
//IL_0de7: Unknown result type (might be due to invalid IL or missing references)
//IL_0df1: Expected O, but got Unknown
//IL_139b: Unknown result type (might be due to invalid IL or missing references)
//IL_13a5: Expected O, but got Unknown
//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
//IL_03cc: Expected O, but got Unknown
//IL_0620: Unknown result type (might be due to invalid IL or missing references)
//IL_062a: Expected O, but got Unknown
//IL_0766: Unknown result type (might be due to invalid IL or missing references)
//IL_0770: Expected O, but got Unknown
//IL_0938: Unknown result type (might be due to invalid IL or missing references)
//IL_0942: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<_process_Waiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[8]
{
(Token t) => (int)t.Type == 87,
delegate(Token t)
{
IdentifierToken val20 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val20 != null && val20.Name == "paint_node";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val19 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val19 != null && val19.Name == "_paint_process";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val18 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val18 != null && val18.Name == "delta";
},
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 89
}, false, false);
<_rot_speed_Waiter>5__2 = new MultiTokenWaiter(new Func<Token, bool>[17]
{
delegate(Token t)
{
IdentifierToken val17 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val17 != null && val17.Name == "rotation";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val16 != null && val16.Name == "y";
},
(Token t) => (int)t.Type == 23,
(Token t) => (int)t.Type == 5,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val15 != null && val15.Name == "rotation";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val14 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val14 != null && val14.Name == "y";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val13 != null && val13.Name == "rot_help";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val12 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val12 != null && val12.Name == "rotation";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val11 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val11 != null && val11.Name == "y";
},
(Token t) => (int)t.Type == 82,
(Token t) => t is ConstantToken
}, false, false);
<_gravity_snap_Waiter>5__3 = new MultiTokenWaiter(new Func<Token, bool>[9]
{
delegate(Token t)
{
IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val10 != null && val10.Name == "move_and_slide_with_snap";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val9 != null && val9.Name == "velocity";
},
(Token t) => (int)t.Type == 16,
delegate(Token t)
{
IdentifierToken val8 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val8 != null && val8.Name == "gravity_vec";
},
(Token t) => (int)t.Type == 16,
delegate(Token t)
{
IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val7 != null && val7.Name == "dive_vec";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val6 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val6 != null && val6.Name == "snap_vec";
}
}, false, false);
<_camera_fov_Waiter>5__4 = new MultiTokenWaiter(new Func<Token, bool>[13]
{
delegate(Token t)
{
IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val5 != null && val5.Name == "camera";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val4 != null && val4.Name == "fov";
},
(Token t) => (int)t.Type == 23,
(Token t) => (int)t.Type == 5,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val3 != null && val3.Name == "camera";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "fov";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "desired_fov";
},
(Token t) => (int)t.Type == 82,
(Token t) => t is ConstantToken
}, false, false);
<>s__5 = tokens.GetEnumerator();
<>1__state = -3;
break;
case 1:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 2;
return true;
case 2:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("owner_id");
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = new Token((TokenType)7, (uint?)null);
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Network");
<>1__state = 6;
return true;
case 6:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 7;
return true;
case 7:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("STEAM_ID");
<>1__state = 8;
return true;
case 8:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 9;
return true;
case 9:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("_process_movement");
<>1__state = 10;
return true;
case 10:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("delta");
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 14;
return true;
case 14:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("owner_id");
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
<>2__current = new Token((TokenType)7, (uint?)null);
<>1__state = 17;
return true;
case 17:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Network");
<>1__state = 18;
return true;
case 18:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 19;
return true;
case 19:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("STEAM_ID");
<>1__state = 20;
return true;
case 20:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 21;
return true;
case 21:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("_camera_update");
<>1__state = 22;
return true;
case 22:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 23;
return true;
case 23:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 24;
return true;
case 24:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 25;
return true;
case 25:
<>1__state = -3;
goto IL_1654;
case 26:
<>1__state = -3;
<>2__current = new Token((TokenType)18, (uint?)null);
<>1__state = 27;
return true;
case 27:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 28;
return true;
case 28:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.2, false));
<>1__state = 29;
return true;
case 29:
<>1__state = -3;
<>2__current = new Token((TokenType)19, (uint?)null);
<>1__state = 30;
return true;
case 30:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.016667, false));
<>1__state = 31;
return true;
case 31:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 32;
return true;
case 32:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 33;
return true;
case 33:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("owner_id");
<>1__state = 34;
return true;
case 34:
<>1__state = -3;
<>2__current = new Token((TokenType)7, (uint?)null);
<>1__state = 35;
return true;
case 35:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Network");
<>1__state = 36;
return true;
case 36:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 37;
return true;
case 37:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("STEAM_ID");
<>1__state = 38;
return true;
case 38:
<>1__state = -3;
<>2__current = new Token((TokenType)40, (uint?)null);
<>1__state = 39;
return true;
case 39:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.2, false));
<>1__state = 40;
return true;
case 40:
<>1__state = -3;
<_rot_speed_Waiter>5__2.Reset();
<>4__this._formulaCount++;
goto IL_1654;
case 41:
<>1__state = -3;
<>2__current = new Token((TokenType)18, (uint?)null);
<>1__state = 42;
return true;
case 42:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 43;
return true;
case 43:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("delta");
<>1__state = 44;
return true;
case 44:
<>1__state = -3;
<>2__current = new Token((TokenType)18, (uint?)null);
<>1__state = 45;
return true;
case 45:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(4.0, false));
<>1__state = 46;
return true;
case 46:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 47;
return true;
case 47:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("owner_id");
<>1__state = 48;
return true;
case 48:
<>1__state = -3;
<>2__current = new Token((TokenType)7, (uint?)null);
<>1__state = 49;
return true;
case 49:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Network");
<>1__state = 50;
return true;
case 50:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 51;
return true;
case 51:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("STEAM_ID");
<>1__state = 52;
return true;
case 52:
<>1__state = -3;
<>2__current = new Token((TokenType)40, (uint?)null);
<>1__state = 53;
return true;
case 53:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
<>1__state = 54;
return true;
case 54:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 55;
return true;
case 55:
<>1__state = -3;
goto IL_1654;
case 56:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
<>1__state = 57;
return true;
case 57:
<>1__state = -3;
<>2__current = new Token((TokenType)19, (uint?)null);
<>1__state = 58;
return true;
case 58:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Engine");
<>1__state = 59;
return true;
case 59:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 60;
return true;
case 60:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("get_frames_per_second");
<>1__state = 61;
return true;
case 61:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 62;
return true;
case 62:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 63;
return true;
case 63:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 64;
return true;
case 64:
<>1__state = -3;
<>2__current = new Token((TokenType)18, (uint?)null);
<>1__state = 65;
return true;
case 65:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 66;
return true;
case 66:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.2, false));
<>1__state = 67;
return true;
case 67:
<>1__state = -3;
<>2__current = new Token((TokenType)19, (uint?)null);
<>1__state = 68;
return true;
case 68:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.016667, false));
<>1__state = 69;
return true;
case 69:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 70;
return true;
case 70:
<>1__state = -3;
goto IL_1654;
case 71:
{
<>1__state = -3;
goto IL_1654;
}
IL_1654:
<token>5__6 = null;
break;
}
if (((global::System.Collections.IEnumerator)<>s__5).MoveNext())
{
<token>5__6 = <>s__5.Current;
if (<_process_Waiter>5__1.Check(<token>5__6))
{
<>2__current = <token>5__6;
<>1__state = 1;
return true;
}
if (<_rot_speed_Waiter>5__2.Check(<token>5__6))
{
Mod._inteface.Logger.Information<int>("[SmoothCam] Replacing rotation speed delta {}/3...", <>4__this._formulaCount + 1);
<>2__current = (Token)new IdentifierToken("delta");
<>1__state = 26;
return true;
}
if (<_gravity_snap_Waiter>5__3.Check(<token>5__6))
{
Mod._inteface.Logger.Information("[SmoothCam] Replacing y-axis snap vector...");
<>2__current = <token>5__6;
<>1__state = 41;
return true;
}
if (<_camera_fov_Waiter>5__4.Check(<token>5__6))
{
Mod._inteface.Logger.Information("[SmoothCam] Replacing FOV interpolation delta...");
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 56;
return true;
}
<>2__current = <token>5__6;
<>1__state = 71;
return true;
}
<>m__Finally1();
<>s__5 = null;
return false;
}
catch
{
//try-fault
((global::System.IDisposable)this).Dispose();
throw;
}
}
bool global::System.Collections.IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__5 != null)
{
((global::System.IDisposable)<>s__5).Dispose();
}
}
[DebuggerHidden]
void global::System.Collections.IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
[DebuggerHidden]
global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
{
<Modify>d__2 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__2(0)
{
<>4__this = <>4__this
};
}
<Modify>d__.path = <>3__path;
<Modify>d__.tokens = <>3__tokens;
return <Modify>d__;
}
[DebuggerHidden]
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
}
}
private int _formulaCount = 0;
public bool ShouldRun(string path)
{
return path == "res://Scenes/Entities/Player/player.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__2))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
MultiTokenWaiter _process_Waiter = new MultiTokenWaiter(new Func<Token, bool>[8]
{
(Token t) => (int)t.Type == 87,
delegate(Token t)
{
IdentifierToken val20 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val20 != null && val20.Name == "paint_node";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val19 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val19 != null && val19.Name == "_paint_process";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val18 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val18 != null && val18.Name == "delta";
},
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 89
}, false, false);
MultiTokenWaiter _rot_speed_Waiter = new MultiTokenWaiter(new Func<Token, bool>[17]
{
delegate(Token t)
{
IdentifierToken val17 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val17 != null && val17.Name == "rotation";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val16 != null && val16.Name == "y";
},
(Token t) => (int)t.Type == 23,
(Token t) => (int)t.Type == 5,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val15 != null && val15.Name == "rotation";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val14 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val14 != null && val14.Name == "y";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val13 != null && val13.Name == "rot_help";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val12 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val12 != null && val12.Name == "rotation";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val11 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val11 != null && val11.Name == "y";
},
(Token t) => (int)t.Type == 82,
(Token t) => t is ConstantToken
}, false, false);
MultiTokenWaiter _gravity_snap_Waiter = new MultiTokenWaiter(new Func<Token, bool>[9]
{
delegate(Token t)
{
IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val10 != null && val10.Name == "move_and_slide_with_snap";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val9 != null && val9.Name == "velocity";
},
(Token t) => (int)t.Type == 16,
delegate(Token t)
{
IdentifierToken val8 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val8 != null && val8.Name == "gravity_vec";
},
(Token t) => (int)t.Type == 16,
delegate(Token t)
{
IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val7 != null && val7.Name == "dive_vec";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val6 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val6 != null && val6.Name == "snap_vec";
}
}, false, false);
MultiTokenWaiter _camera_fov_Waiter = new MultiTokenWaiter(new Func<Token, bool>[13]
{
delegate(Token t)
{
IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val5 != null && val5.Name == "camera";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val4 != null && val4.Name == "fov";
},
(Token t) => (int)t.Type == 23,
(Token t) => (int)t.Type == 5,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val3 != null && val3.Name == "camera";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "fov";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "desired_fov";
},
(Token t) => (int)t.Type == 82,
(Token t) => t is ConstantToken
}, false, false);
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token token = enumerator.Current;
if (_process_Waiter.Check(token))
{
yield return token;
yield return new Token((TokenType)89, (uint?)1u);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("owner_id");
yield return new Token((TokenType)7, (uint?)null);
yield return (Token)new IdentifierToken("Network");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("STEAM_ID");
yield return new Token((TokenType)86, (uint?)null);
yield return (Token)new IdentifierToken("_process_movement");
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new IdentifierToken("delta");
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)1u);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("owner_id");
yield return new Token((TokenType)7, (uint?)null);
yield return (Token)new IdentifierToken("Network");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("STEAM_ID");
yield return new Token((TokenType)86, (uint?)null);
yield return (Token)new IdentifierToken("_camera_update");
yield return new Token((TokenType)80, (uint?)null);
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)1u);
}
else if (_rot_speed_Waiter.Check(token))
{
Mod._inteface.Logger.Information<int>("[SmoothCam] Replacing rotation speed delta {}/3...", _formulaCount + 1);
yield return (Token)new IdentifierToken("delta");
yield return new Token((TokenType)18, (uint?)null);
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.2, false));
yield return new Token((TokenType)19, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.016667, false));
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("owner_id");
yield return new Token((TokenType)7, (uint?)null);
yield return (Token)new IdentifierToken("Network");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("STEAM_ID");
yield return new Token((TokenType)40, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.2, false));
_rot_speed_Waiter.Reset();
_formulaCount++;
}
else if (_gravity_snap_Waiter.Check(token))
{
Mod._inteface.Logger.Information("[SmoothCam] Replacing y-axis snap vector...");
yield return token;
yield return new Token((TokenType)18, (uint?)null);
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new IdentifierToken("delta");
yield return new Token((TokenType)18, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(4.0, false));
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("owner_id");
yield return new Token((TokenType)7, (uint?)null);
yield return (Token)new IdentifierToken("Network");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("STEAM_ID");
yield return new Token((TokenType)40, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
yield return new Token((TokenType)81, (uint?)null);
}
else if (_camera_fov_Waiter.Check(token))
{
Mod._inteface.Logger.Information("[SmoothCam] Replacing FOV interpolation delta...");
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
yield return new Token((TokenType)19, (uint?)null);
yield return (Token)new IdentifierToken("Engine");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("get_frames_per_second");
yield return new Token((TokenType)80, (uint?)null);
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)18, (uint?)null);
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.2, false));
yield return new Token((TokenType)19, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.016667, false));
yield return new Token((TokenType)81, (uint?)null);
}
else
{
yield return token;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
public class PlayerPreFixer : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
{
private int <>1__state;
private Token <>2__current;
private int <>l__initialThreadId;
private string path;
public string <>3__path;
private global::System.Collections.Generic.IEnumerable<Token> tokens;
public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;
public PlayerPreFixer <>4__this;
private MultiTokenWaiter <_process_movement_Waiter>5__1;
private MultiTokenWaiter <_camera_update_Waiter>5__2;
private global::System.Collections.Generic.IEnumerator<Token> <>s__3;
private Token <token>5__4;
Token global::System.Collections.Generic.IEnumerator<Token>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object global::System.Collections.IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Modify>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void global::System.IDisposable.Dispose()
{
int num = <>1__state;
if (num != -3 && (uint)(num - 1) > 16u)
{
return;
}
try
{
}
finally
{
<>m__Finally1();
}
}
private bool MoveNext()
{
//IL_0272: Unknown result type (might be due to invalid IL or missing references)
//IL_027c: Expected O, but got Unknown
//IL_0298: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: Expected O, but got Unknown
//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
//IL_02cd: Expected O, but got Unknown
//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
//IL_02f3: Expected O, but got Unknown
//IL_0315: Unknown result type (might be due to invalid IL or missing references)
//IL_031f: Expected O, but got Unknown
//IL_033b: Unknown result type (might be due to invalid IL or missing references)
//IL_0345: Expected O, but got Unknown
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_0371: Expected O, but got Unknown
//IL_03de: Unknown result type (might be due to invalid IL or missing references)
//IL_03e8: Expected O, but got Unknown
//IL_0405: Unknown result type (might be due to invalid IL or missing references)
//IL_040f: Expected O, but got Unknown
//IL_0431: Unknown result type (might be due to invalid IL or missing references)
//IL_043b: Expected O, but got Unknown
//IL_0458: Unknown result type (might be due to invalid IL or missing references)
//IL_0462: Expected O, but got Unknown
//IL_0485: Unknown result type (might be due to invalid IL or missing references)
//IL_048f: Expected O, but got Unknown
//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
//IL_04b6: Expected O, but got Unknown
//IL_04d9: Unknown result type (might be due to invalid IL or missing references)
//IL_04e3: Expected O, but got Unknown
//IL_014e: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Expected O, but got Unknown
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
//IL_0250: Expected O, but got Unknown
//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
//IL_03bb: Expected O, but got Unknown
//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<_process_movement_Waiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[4]
{
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "_get_input";
},
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 89
}, false, false);
<_camera_update_Waiter>5__2 = new MultiTokenWaiter(new Func<Token, bool>[4]
{
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "_update_animation_data";
},
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 89
}, false, false);
<>s__3 = tokens.GetEnumerator();
<>1__state = -3;
break;
case 1:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 2;
return true;
case 2:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("owner_id");
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = new Token((TokenType)8, (uint?)null);
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Network");
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 6;
return true;
case 6:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("STEAM_ID");
<>1__state = 7;
return true;
case 7:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 8;
return true;
case 8:
<>1__state = -3;
goto IL_051c;
case 9:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 10;
return true;
case 10:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("owner_id");
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = new Token((TokenType)8, (uint?)null);
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Network");
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 14;
return true;
case 14:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("STEAM_ID");
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
goto IL_051c;
case 17:
{
<>1__state = -3;
goto IL_051c;
}
IL_051c:
<token>5__4 = null;
break;
}
if (((global::System.Collections.IEnumerator)<>s__3).MoveNext())
{
<token>5__4 = <>s__3.Current;
if (<_process_movement_Waiter>5__1.Check(<token>5__4))
{
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 1;
return true;
}
if (<_camera_update_Waiter>5__2.Check(<token>5__4))
{
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 9;
return true;
}
<>2__current = <token>5__4;
<>1__state = 17;
return true;
}
<>m__Finally1();
<>s__3 = null;
return false;
}
catch
{
//try-fault
((global::System.IDisposable)this).Dispose();
throw;
}
}
bool global::System.Collections.IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__3 != null)
{
((global::System.IDisposable)<>s__3).Dispose();
}
}
[DebuggerHidden]
void global::System.Collections.IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
[DebuggerHidden]
global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
{
<Modify>d__1 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__1(0)
{
<>4__this = <>4__this
};
}
<Modify>d__.path = <>3__path;
<Modify>d__.tokens = <>3__tokens;
return <Modify>d__;
}
[DebuggerHidden]
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
}
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/Entities/Player/player.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__1))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
MultiTokenWaiter _process_movement_Waiter = new MultiTokenWaiter(new Func<Token, bool>[4]
{
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "_get_input";
},
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 89
}, false, false);
MultiTokenWaiter _camera_update_Waiter = new MultiTokenWaiter(new Func<Token, bool>[4]
{
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "_update_animation_data";
},
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 89
}, false, false);
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token token = enumerator.Current;
if (_process_movement_Waiter.Check(token))
{
yield return new Token((TokenType)89, (uint?)1u);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("owner_id");
yield return new Token((TokenType)8, (uint?)null);
yield return (Token)new IdentifierToken("Network");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("STEAM_ID");
yield return new Token((TokenType)86, (uint?)null);
}
else if (_camera_update_Waiter.Check(token))
{
yield return new Token((TokenType)89, (uint?)1u);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("owner_id");
yield return new Token((TokenType)8, (uint?)null);
yield return (Token)new IdentifierToken("Network");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("STEAM_ID");
yield return new Token((TokenType)86, (uint?)null);
}
else
{
yield return token;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
public class TailFixer : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
{
private int <>1__state;
private Token <>2__current;
private int <>l__initialThreadId;
private string path;
public string <>3__path;
private global::System.Collections.Generic.IEnumerable<Token> tokens;
public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;
public TailFixer <>4__this;
private MultiTokenWaiter <_physics_process_Waiter>5__1;
private global::System.Collections.Generic.IEnumerator<Token> <>s__2;
private Token <token>5__3;
Token global::System.Collections.Generic.IEnumerator<Token>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object global::System.Collections.IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Modify>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void global::System.IDisposable.Dispose()
{
int num = <>1__state;
if (num != -3 && (uint)(num - 1) > 9u)
{
return;
}
try
{
}
finally
{
<>m__Finally1();
}
}
private bool MoveNext()
{
//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
//IL_01e6: Expected O, but got Unknown
//IL_0208: Unknown result type (might be due to invalid IL or missing references)
//IL_0212: Expected O, but got Unknown
//IL_022e: Unknown result type (might be due to invalid IL or missing references)
//IL_0238: Expected O, but got Unknown
//IL_025a: Unknown result type (might be due to invalid IL or missing references)
//IL_0264: Expected O, but got Unknown
//IL_0280: Unknown result type (might be due to invalid IL or missing references)
//IL_028a: Expected O, but got Unknown
//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
//IL_02b6: Expected O, but got Unknown
//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
//IL_02e2: Expected O, but got Unknown
//IL_0301: Unknown result type (might be due to invalid IL or missing references)
//IL_030b: Expected O, but got Unknown
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01bd: Expected O, but got Unknown
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<_physics_process_Waiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[6]
{
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "_physics_process";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "delta";
},
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89
}, false, false);
<>s__2 = tokens.GetEnumerator();
<>1__state = -3;
break;
case 1:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)0u);
<>1__state = 2;
return true;
case 2:
<>1__state = -3;
<>2__current = new Token((TokenType)48, (uint?)null);
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("_process");
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("delta");
<>1__state = 6;
return true;
case 6:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 7;
return true;
case 7:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 8;
return true;
case 8:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 9;
return true;
case 9:
<>1__state = -3;
goto IL_0344;
case 10:
{
<>1__state = -3;
goto IL_0344;
}
IL_0344:
<token>5__3 = null;
break;
}
if (((global::System.Collections.IEnumerator)<>s__2).MoveNext())
{
<token>5__3 = <>s__2.Current;
if (<_physics_process_Waiter>5__1.Check(<token>5__3))
{
<>2__current = new Token((TokenType)45, (uint?)null);
<>1__state = 1;
return true;
}
<>2__current = <token>5__3;
<>1__state = 10;
return true;
}
<>m__Finally1();
<>s__2 = null;
return false;
}
catch
{
//try-fault
((global::System.IDisposable)this).Dispose();
throw;
}
}
bool global::System.Collections.IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__2 != null)
{
((global::System.IDisposable)<>s__2).Dispose();
}
}
[DebuggerHidden]
void global::System.Collections.IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
[DebuggerHidden]
global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
{
<Modify>d__1 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__1(0)
{
<>4__this = <>4__this
};
}
<Modify>d__.path = <>3__path;
<Modify>d__.tokens = <>3__tokens;
return <Modify>d__;
}
[DebuggerHidden]
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
}
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/Entities/Player/tail_root.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__1))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
MultiTokenWaiter _physics_process_Waiter = new MultiTokenWaiter(new Func<Token, bool>[6]
{
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "_physics_process";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "delta";
},
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89
}, false, false);
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token token = enumerator.Current;
if (_physics_process_Waiter.Check(token))
{
yield return new Token((TokenType)45, (uint?)null);
yield return new Token((TokenType)89, (uint?)0u);
yield return new Token((TokenType)48, (uint?)null);
yield return (Token)new IdentifierToken("_process");
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new IdentifierToken("delta");
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)86, (uint?)null);
yield return new Token((TokenType)89, (uint?)1u);
}
else
{
yield return token;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
}