0
0
forked from SamSWAT/FOV

Fix to work on 3.9.*

This commit is contained in:
CWX 2024-08-02 14:10:29 +01:00
parent d6cffa6573
commit 4b5f22f23e
11 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
using Aki.Reflection.Patching;
using SPT.Reflection.Patching;
using EFT.UI.Settings;
using System;
using System.Collections.ObjectModel;

View File

@ -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);
}
}
}

View File

@ -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]

Binary file not shown.

View File

@ -31,9 +31,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Aki.Reflection">
<HintPath>References\Aki.Reflection.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>References\Assembly-CSharp.dll</HintPath>
</Reference>
@ -43,6 +40,9 @@
<Reference Include="Comfort">
<HintPath>References\Comfort.dll</HintPath>
</Reference>
<Reference Include="spt-reflection">
<HintPath>References\spt-reflection.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>References\UnityEngine.dll</HintPath>

View File

@ -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]