diff --git a/project/SamSWAT.FOV/FovPatch.cs b/project/SamSWAT.FOV/FovPatch.cs index 6f78a22..9b2c492 100644 --- a/project/SamSWAT.FOV/FovPatch.cs +++ b/project/SamSWAT.FOV/FovPatch.cs @@ -1,4 +1,4 @@ -using Aki.Reflection.Patching; +using SPT.Reflection.Patching; using EFT.UI.Settings; using System; using System.Collections.ObjectModel; diff --git a/project/SamSWAT.FOV/FovPlugin.cs b/project/SamSWAT.FOV/FovPlugin.cs index 6f2ae6b..045a8d1 100644 --- a/project/SamSWAT.FOV/FovPlugin.cs +++ b/project/SamSWAT.FOV/FovPlugin.cs @@ -53,7 +53,8 @@ namespace SamSWAT.FOV return; } - gameWorld.RegisteredPlayers.Find(p => p.IsYourPlayer).ProceduralWeaponAnimation.HandsContainer.CameraOffset = new Vector3(0.04f, 0.04f, HudFov.Value); + gameWorld.MainPlayer.ProceduralWeaponAnimation.HandsContainer.CameraOffset = new Vector3(0.04f, 0.04f, HudFov.Value); + // gameWorld.RegisteredPlayers.Find(p => p.IsYourPlayer).ProceduralWeaponAnimation.HandsContainer.CameraOffset = new Vector3(0.04f, 0.04f, HudFov.Value); } } } diff --git a/project/SamSWAT.FOV/PlayerSpringPatch.cs b/project/SamSWAT.FOV/PlayerSpringPatch.cs index cade71f..15dd536 100644 --- a/project/SamSWAT.FOV/PlayerSpringPatch.cs +++ b/project/SamSWAT.FOV/PlayerSpringPatch.cs @@ -1,4 +1,4 @@ -using Aki.Reflection.Patching; +using SPT.Reflection.Patching; using EFT.Animations; using System.Reflection; using UnityEngine; @@ -9,7 +9,7 @@ namespace SamSWAT.FOV { protected override MethodBase GetTargetMethod() { - return typeof(PlayerSpring).GetMethod("Start", BindingFlags.NonPublic | BindingFlags.Instance); + return typeof(PlayerSpring).GetMethod("Start", BindingFlags.Public | BindingFlags.Instance); } [PatchPostfix] diff --git a/project/SamSWAT.FOV/References/Aki.Reflection.dll b/project/SamSWAT.FOV/References/Aki.Reflection.dll deleted file mode 100644 index 72b9cbe..0000000 Binary files a/project/SamSWAT.FOV/References/Aki.Reflection.dll and /dev/null differ diff --git a/project/SamSWAT.FOV/References/Assembly-CSharp.dll b/project/SamSWAT.FOV/References/Assembly-CSharp.dll index 23cbaaa..c1aa8d1 100644 Binary files a/project/SamSWAT.FOV/References/Assembly-CSharp.dll and b/project/SamSWAT.FOV/References/Assembly-CSharp.dll differ diff --git a/project/SamSWAT.FOV/References/BepInEx.dll b/project/SamSWAT.FOV/References/BepInEx.dll index 8aedff0..826b479 100644 Binary files a/project/SamSWAT.FOV/References/BepInEx.dll and b/project/SamSWAT.FOV/References/BepInEx.dll differ diff --git a/project/SamSWAT.FOV/References/Comfort.dll b/project/SamSWAT.FOV/References/Comfort.dll index 96d7476..5eeb3c6 100644 Binary files a/project/SamSWAT.FOV/References/Comfort.dll and b/project/SamSWAT.FOV/References/Comfort.dll differ diff --git a/project/SamSWAT.FOV/References/UnityEngine.CoreModule.dll b/project/SamSWAT.FOV/References/UnityEngine.CoreModule.dll index 7d585db..d8a5448 100644 Binary files a/project/SamSWAT.FOV/References/UnityEngine.CoreModule.dll and b/project/SamSWAT.FOV/References/UnityEngine.CoreModule.dll differ diff --git a/project/SamSWAT.FOV/References/spt-reflection.dll b/project/SamSWAT.FOV/References/spt-reflection.dll new file mode 100644 index 0000000..9408485 Binary files /dev/null and b/project/SamSWAT.FOV/References/spt-reflection.dll differ diff --git a/project/SamSWAT.FOV/SamSWAT.FOV.csproj b/project/SamSWAT.FOV/SamSWAT.FOV.csproj index 8597155..5d89db0 100644 --- a/project/SamSWAT.FOV/SamSWAT.FOV.csproj +++ b/project/SamSWAT.FOV/SamSWAT.FOV.csproj @@ -31,9 +31,6 @@ 4 - - References\Aki.Reflection.dll - References\Assembly-CSharp.dll @@ -43,6 +40,9 @@ References\Comfort.dll + + References\spt-reflection.dll + References\UnityEngine.dll diff --git a/project/SamSWAT.FOV/SettingsApplierPatch.cs b/project/SamSWAT.FOV/SettingsApplierPatch.cs index 8957ab4..4fe6ac5 100644 --- a/project/SamSWAT.FOV/SettingsApplierPatch.cs +++ b/project/SamSWAT.FOV/SettingsApplierPatch.cs @@ -1,5 +1,5 @@ -using Aki.Reflection.Patching; -using Aki.Reflection.Utils; +using SPT.Reflection.Patching; +using SPT.Reflection.Utils; using System; using System.Linq; using System.Reflection; @@ -11,8 +11,7 @@ namespace SamSWAT.FOV { protected override MethodBase GetTargetMethod() { - Type gclass911 = PatchConstants.EftTypes.Single(x => x.GetMethod("Clone") != null && x.GetField("NotificationTransportType") != null); - return gclass911.GetNestedTypes(PatchConstants.PrivateFlags)[0].GetMethod("method_0", PatchConstants.PrivateFlags); + return typeof(GClass960.Class1578).GetMethod("method_0", BindingFlags.Instance | BindingFlags.Public); } [PatchPostfix]