mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-04 23:39: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
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue