mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-01 13:59:22 +00:00
Merge remote-tracking branch 'JumpPatch/main'
Merge JumpPatch
This commit is contained in:
commit
0c6613ac8c
7 changed files with 164 additions and 0 deletions
15
JumpPatch/HarmonyPatches.cs
Normal file
15
JumpPatch/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Systems.MovementSystem;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace NAK.Melons.JumpPatch.HarmonyPatches;
|
||||
|
||||
class MovementSystemPatches
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(MovementSystem), "Update")]
|
||||
private static void Prefix_MovementSystem_Update(ref bool ____isGrounded)
|
||||
{
|
||||
CVRInputManager.Instance.jump = CVRInputManager.Instance.jump && ____isGrounded;
|
||||
}
|
||||
}
|
37
JumpPatch/JumpPatch.csproj
Normal file
37
JumpPatch/JumpPatch.csproj
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MelonLoader">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.InputLegacyModule">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Deploy" AfterTargets="Build">
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" />
|
||||
<Message Text="Copied $(TargetPath) to C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" Importance="high" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
25
JumpPatch/JumpPatch.sln
Normal file
25
JumpPatch/JumpPatch.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32630.192
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JumpPatch", "JumpPatch.csproj", "{E205C609-750F-4EF6-9180-09907A3D5EFA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E205C609-750F-4EF6-9180-09907A3D5EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E205C609-750F-4EF6-9180-09907A3D5EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E205C609-750F-4EF6-9180-09907A3D5EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E205C609-750F-4EF6-9180-09907A3D5EFA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {75945C3C-368D-4A04-8EB7-F254473A946F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
24
JumpPatch/Main.cs
Normal file
24
JumpPatch/Main.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using MelonLoader;
|
||||
|
||||
namespace NAK.Melons.JumpPatch;
|
||||
|
||||
public class JumpPatchMod : MelonMod
|
||||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
ApplyPatches(typeof(HarmonyPatches.MovementSystemPatches));
|
||||
}
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||
LoggerInstance.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
30
JumpPatch/Properties/AssemblyInfo.cs
Normal file
30
JumpPatch/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using MelonLoader;
|
||||
using NAK.Melons.JumpPatch.Properties;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyTitle(nameof(NAK.Melons.JumpPatch))]
|
||||
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||
[assembly: AssemblyProduct(nameof(NAK.Melons.JumpPatch))]
|
||||
|
||||
[assembly: MelonInfo(
|
||||
typeof(NAK.Melons.JumpPatch.JumpPatchMod),
|
||||
nameof(NAK.Melons.JumpPatch),
|
||||
AssemblyInfoParams.Version,
|
||||
AssemblyInfoParams.Author,
|
||||
downloadLink: "https://github.com/NotAKidOnSteam/JumpPatch"
|
||||
)]
|
||||
|
||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
[assembly: HarmonyDontPatchAll]
|
||||
|
||||
namespace NAK.Melons.JumpPatch.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.0";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
23
JumpPatch/format.json
Normal file
23
JumpPatch/format.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"_id": -1,
|
||||
"name": "JumpPatch",
|
||||
"modversion": "1.0.0",
|
||||
"gameversion": "2022r170",
|
||||
"loaderversion": "0.5.7",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Prevents you from jumping until you've been grounded for a frame.\nThis ensures Grounded parameter fires when hitting the ground while holding jump.",
|
||||
"searchtags": [
|
||||
"toes",
|
||||
"vrik",
|
||||
"ik",
|
||||
"feet"
|
||||
],
|
||||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/JumpPatch/releases/download/v1.0.0/JumpPatch.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/JumpPatch/",
|
||||
"changelog": "- Initial Release\n- I like my jump animations.",
|
||||
"embedcolor": "#e56597"
|
||||
}
|
10
README.md
10
README.md
|
@ -159,6 +159,16 @@ https://feedback.abinteractive.net/p/about-ik-behaviour
|
|||
https://feedback.abinteractive.net/p/vrik-addplatformmotion-for-movement-parents
|
||||
|
||||
https://feedback.abinteractive.net/p/halfbodyik-feet-will-only-point-in-direction-of-head
|
||||
# JumpPatch
|
||||
|
||||
Prevents you from jumping until you've been grounded for a frame.
|
||||
|
||||
This ensures Grounded parameter fires when hitting the ground while holding jump.
|
||||
|
||||
https://user-images.githubusercontent.com/37721153/231921029-f5bf5236-3dbb-4720-8eb0-fafce4e59cf8.mp4
|
||||
|
||||
## Relevant Feedback Posts:
|
||||
https://feedback.abinteractive.net/p/grounded-parameter-does-not-fire-immediatly-after-landing
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue