mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 23:09:22 +00:00
killed RelativeSync, now its just RelativeSyncJitterFix
This commit is contained in:
parent
30c069388c
commit
c368daab4f
16 changed files with 100 additions and 878 deletions
25
RelativeSyncJitterFix/Main.cs
Normal file
25
RelativeSyncJitterFix/Main.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using MelonLoader;
|
||||
|
||||
namespace NAK.RelativeSyncJitterFix;
|
||||
|
||||
public class RelativeSyncJitterFixMod : MelonMod
|
||||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
// Experimental sync hack
|
||||
ApplyPatches(typeof(Patches.CVRSpawnablePatches));
|
||||
}
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||
LoggerInstance.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
22
RelativeSyncJitterFix/Patches.cs
Normal file
22
RelativeSyncJitterFix/Patches.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using ABI.CCK.Components;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace NAK.RelativeSyncJitterFix.Patches;
|
||||
|
||||
internal static class CVRSpawnablePatches
|
||||
{
|
||||
private static bool _canUpdate;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRSpawnable), nameof(CVRSpawnable.FixedUpdate))]
|
||||
private static void Postfix_CVRSpawnable_FixedUpdate(ref CVRSpawnable __instance)
|
||||
{
|
||||
_canUpdate = true;
|
||||
__instance.Update();
|
||||
_canUpdate = false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(CVRSpawnable), nameof(CVRSpawnable.Update))]
|
||||
private static bool Prefix_CVRSpawnable_Update() => _canUpdate;
|
||||
}
|
32
RelativeSyncJitterFix/Properties/AssemblyInfo.cs
Normal file
32
RelativeSyncJitterFix/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using NAK.RelativeSyncJitterFix.Properties;
|
||||
using MelonLoader;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyTitle(nameof(NAK.RelativeSyncJitterFix))]
|
||||
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||
[assembly: AssemblyProduct(nameof(NAK.RelativeSyncJitterFix))]
|
||||
|
||||
[assembly: MelonInfo(
|
||||
typeof(NAK.RelativeSyncJitterFix.RelativeSyncJitterFixMod),
|
||||
nameof(NAK.RelativeSyncJitterFix),
|
||||
AssemblyInfoParams.Version,
|
||||
AssemblyInfoParams.Author,
|
||||
downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RelativeSyncJitterFix"
|
||||
)]
|
||||
|
||||
[assembly: MelonGame("ChilloutVR", "ChilloutVR")]
|
||||
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
[assembly: MelonColor(255, 246, 25, 99)] // red-pink
|
||||
[assembly: MelonAuthorColor(255, 158, 21, 32)] // red
|
||||
[assembly: HarmonyDontPatchAll]
|
||||
|
||||
namespace NAK.RelativeSyncJitterFix.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.0";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
21
RelativeSyncJitterFix/README.md
Normal file
21
RelativeSyncJitterFix/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# RelativeSyncJitterFix
|
||||
|
||||
Relative sync jitter fix is the single harmony patch that could not make it into the native release of RelativeSync.
|
||||
Changes when props apply their incoming sync data to be before the character controller simulation.
|
||||
|
||||
## Known Issues
|
||||
- Movement Parents on remote users will still locally jitter.
|
||||
- PuppetMaster/NetIkController applies received position updates in LateUpdate, while character controller updates in FixedUpdate.
|
||||
- Movement Parents using CVRObjectSync synced by remote users will still locally jitter.
|
||||
- CVRObjectSync applies received position updates in LateUpdate, while character controller updates in FixedUpdate.
|
||||
|
||||
---
|
||||
|
||||
Here is the block of text where I tell you this mod is not affiliated with or endorsed by ChilloutVR.
|
||||
https://docs.chilloutvr.net/official/legal/tos/#7-modding-our-games
|
||||
|
||||
> This mod is an independent creation not affiliated with, supported by, or approved by ChilloutVR.
|
||||
|
||||
> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use.
|
||||
|
||||
> To the best of my knowledge, I have adhered to the Modding Guidelines established by ChilloutVR.
|
6
RelativeSyncJitterFix/RelativeSyncJitterFix.csproj
Normal file
6
RelativeSyncJitterFix/RelativeSyncJitterFix.csproj
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Sprays</RootNamespace>
|
||||
</PropertyGroup>
|
||||
</Project>
|
23
RelativeSyncJitterFix/format.json
Normal file
23
RelativeSyncJitterFix/format.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"_id": -1,
|
||||
"name": "RelativeSyncJitterFix",
|
||||
"modversion": "1.0.0",
|
||||
"gameversion": "2025r180",
|
||||
"loaderversion": "0.7.2",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Relative sync jitter fix is the single harmony patch that could not make it into the native release of RelativeSync.\nChanges when props apply their incoming sync data to be before the character controller simulation.",
|
||||
"searchtags": [
|
||||
"relative",
|
||||
"sync",
|
||||
"movement",
|
||||
"chair"
|
||||
],
|
||||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r47/RelativeSyncJitterFix.dll",
|
||||
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RelativeSyncJitterFix/",
|
||||
"changelog": "- Removed RelativeSync except for a single harmony patch",
|
||||
"embedcolor": "#f61963"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue