mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[RelativeSync] Account for official fix for BBCC
This commit is contained in:
parent
b786ecd51c
commit
974fefd896
2 changed files with 4 additions and 2 deletions
|
@ -95,17 +95,19 @@ internal static class BetterBetterCharacterControllerPatches
|
|||
{
|
||||
_noInterpolation = value;
|
||||
if (_rigidbody == null) return;
|
||||
_rigidbody.interpolation = value ? RigidbodyInterpolation.None : RigidbodyInterpolation.Interpolate;
|
||||
_rigidbody.interpolation = value ? RigidbodyInterpolation.None : _initialInterpolation;
|
||||
}
|
||||
}
|
||||
|
||||
private static Rigidbody _rigidbody;
|
||||
private static RigidbodyInterpolation _initialInterpolation;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(BetterBetterCharacterController), nameof(BetterBetterCharacterController.Start))]
|
||||
private static void Postfix_BetterBetterCharacterController_Update(ref BetterBetterCharacterController __instance)
|
||||
{
|
||||
_rigidbody = __instance.GetComponent<Rigidbody>();
|
||||
_initialInterpolation = _rigidbody.interpolation;
|
||||
NoInterpolation = _noInterpolation; // get initial value as patch runs later than settings init
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue