forked from Terkoiz/Freecam
fixes terk asked for + a few things
This commit is contained in:
parent
944bb7d135
commit
0c90ab215a
1
.gitignore
vendored
1
.gitignore
vendored
@ -244,6 +244,7 @@ orleans.codegen.cs
|
|||||||
.idea
|
.idea
|
||||||
Freecam.sln.DotSettings.user
|
Freecam.sln.DotSettings.user
|
||||||
Project/.idea/
|
Project/.idea/
|
||||||
|
Project/Shared/*
|
||||||
|
|
||||||
# Including strong name files can present a security risk
|
# Including strong name files can present a security risk
|
||||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using JetBrains.Annotations;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Terkoiz.Freecam
|
namespace Terkoiz.Freecam
|
||||||
@ -13,6 +14,7 @@ namespace Terkoiz.Freecam
|
|||||||
{
|
{
|
||||||
public bool IsActive = false;
|
public bool IsActive = false;
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
if (!IsActive)
|
if (!IsActive)
|
||||||
@ -81,6 +83,7 @@ namespace Terkoiz.Freecam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
Destroy(this);
|
Destroy(this);
|
||||||
|
@ -3,6 +3,7 @@ using EFT;
|
|||||||
using EFT.CameraControl;
|
using EFT.CameraControl;
|
||||||
using EFT.UI;
|
using EFT.UI;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Terkoiz.Freecam
|
namespace Terkoiz.Freecam
|
||||||
@ -26,6 +27,7 @@ namespace Terkoiz.Freecam
|
|||||||
// Button to toggle between camera and player movement
|
// Button to toggle between camera and player movement
|
||||||
// Independent FoV setting for Freecam mode (_mainCamera.GetComponent<Camera>().fieldOfView = ...)
|
// Independent FoV setting for Freecam mode (_mainCamera.GetComponent<Camera>().fieldOfView = ...)
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
// Find Main Camera
|
// Find Main Camera
|
||||||
@ -44,6 +46,7 @@ namespace Terkoiz.Freecam
|
|||||||
FreecamPlugin.Logger.LogError("Failed to locate GamePlayerOwner");
|
FreecamPlugin.Logger.LogError("Failed to locate GamePlayerOwner");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
if (FreecamPlugin.ToggleUi.Value.IsDown())
|
if (FreecamPlugin.ToggleUi.Value.IsDown())
|
||||||
@ -227,6 +230,7 @@ namespace Terkoiz.Freecam
|
|||||||
return gameWorld.MainPlayer;
|
return gameWorld.MainPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
// Destroy FreeCamScript before FreeCamController if exists
|
// Destroy FreeCamScript before FreeCamController if exists
|
||||||
|
@ -21,7 +21,7 @@ namespace Terkoiz.Freecam
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Add FreeCamController to GameWorld GameObject
|
// Add FreeCamController to GameWorld GameObject
|
||||||
gameworld.GetOrAddComponent<FreecamController>();
|
gameworld.gameObject.AddComponent<FreecamController>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
using BepInEx;
|
using BepInEx;
|
||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using BepInEx.Logging;
|
using BepInEx.Logging;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using KeyboardShortcut = BepInEx.Configuration.KeyboardShortcut;
|
using KeyboardShortcut = BepInEx.Configuration.KeyboardShortcut;
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ namespace Terkoiz.Freecam
|
|||||||
internal static ConfigEntry<bool> CameraRememberLastPosition;
|
internal static ConfigEntry<bool> CameraRememberLastPosition;
|
||||||
public static ConfigEntry<bool> FallDamageToggle;
|
public static ConfigEntry<bool> FallDamageToggle;
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
internal void Start()
|
internal void Start()
|
||||||
{
|
{
|
||||||
new FreecamPatch().Enable();
|
new FreecamPatch().Enable();
|
||||||
@ -123,7 +125,7 @@ namespace Terkoiz.Freecam
|
|||||||
TogglesSectionName,
|
TogglesSectionName,
|
||||||
"FallHeightToggle",
|
"FallHeightToggle",
|
||||||
true,
|
true,
|
||||||
"True disables fall damage, False doesn't simplez");
|
"If enabled, will disable all fall damage for the player.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
36
project/Terkoiz.Freecam/Properties/AssemblyInfo.cs
Normal file
36
project/Terkoiz.Freecam/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("Terkoiz.Freecam")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Terkoiz.Freecam")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("be2de623-48ff-4807-9696-167a17787718")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -7,38 +7,46 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="0Harmony">
|
<Reference Include="0Harmony">
|
||||||
<HintPath>..\..\Shared\0Harmony.dll</HintPath>
|
<HintPath>..\Shared\0Harmony.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Aki.Reflection">
|
<Reference Include="Aki.Reflection">
|
||||||
<HintPath>..\..\Shared\Aki.Reflection.dll</HintPath>
|
<HintPath>..\Shared\Aki.Reflection.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Assembly-CSharp">
|
<Reference Include="Assembly-CSharp">
|
||||||
<HintPath>..\..\Shared\Assembly-CSharp.dll</HintPath>
|
<HintPath>..\Shared\Assembly-CSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="BepInEx">
|
<Reference Include="BepInEx">
|
||||||
<HintPath>..\..\Shared\BepInEx.dll</HintPath>
|
<HintPath>..\Shared\BepInEx.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Comfort">
|
<Reference Include="Comfort">
|
||||||
<HintPath>..\..\Shared\Comfort.dll</HintPath>
|
<HintPath>..\Shared\Comfort.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ConfigurationManager">
|
<Reference Include="ConfigurationManager">
|
||||||
<HintPath>..\..\Shared\ConfigurationManager.dll</HintPath>
|
<HintPath>..\Shared\ConfigurationManager.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ItemComponent.Types">
|
<Reference Include="ItemComponent.Types">
|
||||||
<HintPath>..\..\Shared\ItemComponent.Types.dll</HintPath>
|
<HintPath>..\Shared\ItemComponent.Types.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine">
|
<Reference Include="UnityEngine">
|
||||||
<HintPath>..\..\Shared\UnityEngine.dll</HintPath>
|
<HintPath>..\Shared\UnityEngine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine.CoreModule">
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
<HintPath>..\..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
<HintPath>..\Shared\UnityEngine.CoreModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine.InputLegacyModule">
|
<Reference Include="UnityEngine.InputLegacyModule">
|
||||||
<HintPath>..\..\Shared\UnityEngine.InputLegacyModule.dll</HintPath>
|
<HintPath>..\Shared\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine.UIModule">
|
<Reference Include="UnityEngine.UIModule">
|
||||||
<HintPath>..\..\Shared\UnityEngine.UIModule.dll</HintPath>
|
<HintPath>..\Shared\UnityEngine.UIModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Freecam.cs" />
|
||||||
|
<Compile Include="FreecamController.cs" />
|
||||||
|
<Compile Include="FreecamPlugin.cs" />
|
||||||
|
<Compile Include="FreecamPatch.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user