Updated for SPT 3.9.0
This commit is contained in:
parent
ac56754db2
commit
f49dfbdb01
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ project/References/EFT_Managed/*
|
||||
|
||||
# Allow these files, despite the rules above
|
||||
!project/References/EFT_Managed/.keep
|
||||
!project/References/SPT/.keep
|
||||
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
|
0
project/References/SPT/.keep
Normal file
0
project/References/SPT/.keep
Normal file
@ -1,5 +1,5 @@
|
||||
using System.Reflection;
|
||||
using Aki.Reflection.Patching;
|
||||
using SPT.Reflection.Patching;
|
||||
using EFT.HealthSystem;
|
||||
using HarmonyLib;
|
||||
|
||||
@ -11,7 +11,7 @@ namespace Terkoiz.Freecam
|
||||
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(ActiveHealthController), "HandleFall");
|
||||
return AccessTools.Method(typeof(ActiveHealthController), nameof(ActiveHealthController.HandleFall));
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
|
@ -6,7 +6,7 @@ namespace Terkoiz.Freecam
|
||||
/// <summary>
|
||||
/// A simple free camera to be added to a Unity game object.
|
||||
///
|
||||
/// Full credit to Ashley Davis on GitHub for the inital code:
|
||||
/// Full credit to Ashley Davis on GitHub for the initial code:
|
||||
/// https://gist.github.com/ashleydavis/f025c03a9221bc840a2b
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Reflection;
|
||||
using Aki.Reflection.Patching;
|
||||
using SPT.Reflection.Patching;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using HarmonyLib;
|
||||
@ -10,19 +10,19 @@ namespace Terkoiz.Freecam
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(GameWorld), "OnGameStarted");
|
||||
return AccessTools.Method(typeof(GameWorld), nameof(GameWorld.OnGameStarted));
|
||||
}
|
||||
|
||||
[PatchPostfix]
|
||||
public static void PatchPostFix()
|
||||
{
|
||||
var gameworld = Singleton<GameWorld>.Instance;
|
||||
var gameWorld = Singleton<GameWorld>.Instance;
|
||||
|
||||
if (gameworld == null)
|
||||
if (gameWorld == null)
|
||||
return;
|
||||
|
||||
// Add FreeCamController to GameWorld GameObject
|
||||
gameworld.gameObject.AddComponent<FreecamController>();
|
||||
// Add FreecamController to GameWorld GameObject
|
||||
gameWorld.gameObject.AddComponent<FreecamController>();
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ using KeyboardShortcut = BepInEx.Configuration.KeyboardShortcut;
|
||||
|
||||
namespace Terkoiz.Freecam
|
||||
{
|
||||
[BepInPlugin("com.terkoiz.freecam", "Terkoiz.Freecam", "1.4.3")]
|
||||
[BepInPlugin("com.terkoiz.freecam", "Terkoiz.Freecam", "1.4.4")]
|
||||
public class FreecamPlugin : BaseUnityPlugin
|
||||
{
|
||||
internal new static ManualLogSource Logger { get; private set; }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net471</TargetFramework>
|
||||
<Version>1.4.2</Version>
|
||||
<Version>1.4.4</Version>
|
||||
<Authors>Terkoiz, Kobrakon, CWX</Authors>
|
||||
<RepositoryUrl>https://dev.sp-tarkov.com/Terkoiz/Freecam</RepositoryUrl>
|
||||
<PackageLicenseExpression>NCSA</PackageLicenseExpression>
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>..\References\EFT_Managed\Aki.Reflection.dll</HintPath>
|
||||
<HintPath>..\References\SPT\spt-reflection.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
|
Reference in New Issue
Block a user