killed RelativeSync, now its just RelativeSyncJitterFix

This commit is contained in:
NotAKidoS 2025-08-27 01:34:56 -05:00
parent 30c069388c
commit c368daab4f
16 changed files with 100 additions and 878 deletions

View 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;
}