mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-05 15:59:22 +00:00
[RelativeSync] attempt at fixing jitter (it did not work, it is very broken)
This commit is contained in:
parent
c46bc61619
commit
85e3499615
6 changed files with 305 additions and 230 deletions
|
@ -58,4 +58,25 @@ internal static class NetworkRootDataUpdatePatches
|
|||
{
|
||||
ModNetwork.SendRelativeSyncUpdate(); // Send the relative sync update after the network root data update
|
||||
}
|
||||
}
|
||||
|
||||
internal static class CVRSpawnablePatches
|
||||
{
|
||||
private static bool _allowUpdate;
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(CVRSpawnable), nameof(CVRSpawnable.Update))]
|
||||
private static bool Prefix_CVRSpawnable_Update()
|
||||
{
|
||||
return _allowUpdate;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRSpawnable), nameof(CVRSpawnable.FixedUpdate))]
|
||||
private static void Postfix_CVRSpawnable_FixedUpdate(ref CVRSpawnable __instance)
|
||||
{
|
||||
_allowUpdate = true;
|
||||
__instance.Update();
|
||||
_allowUpdate = false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue