mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 23:09:22 +00:00
[BadAnimatorFix] Don't touch non-loop states.
This commit is contained in:
parent
935639a2f3
commit
ab4276e880
5 changed files with 16 additions and 34 deletions
|
@ -25,7 +25,7 @@ public class BadAnimatorFixer : MonoBehaviour
|
|||
// Skip if mid-transition
|
||||
if (transitionInfo.fullPathHash != 0) continue;
|
||||
// Skip if anim doesn't loop, or hasn't looped enough
|
||||
if (stateInfo.normalizedTime < StateLimit) continue;
|
||||
if (!stateInfo.loop || stateInfo.normalizedTime < StateLimit) continue;
|
||||
// Rewind state, with 10f as buffer, to account for reasonable use of ExitTime
|
||||
float offset = 10f + (stateInfo.normalizedTime % 1f);
|
||||
animator.Play(stateInfo.fullPathHash, layerIndex, offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue