mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 06:49:22 +00:00
22 lines
No EOL
621 B
C#
22 lines
No EOL
621 B
C#
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;
|
|
} |