From 63d92909398a1236f394b7c4722200d882f17a24 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sat, 30 May 2026 15:38:16 -0400 Subject: [PATCH] Add LockedSpeed property to AnimationLayer --- .../Components/AnimationLayerComponent.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/SharpPluginLoader.Core/Components/AnimationLayerComponent.cs b/SharpPluginLoader.Core/Components/AnimationLayerComponent.cs index 74a83cb..8e71a60 100644 --- a/SharpPluginLoader.Core/Components/AnimationLayerComponent.cs +++ b/SharpPluginLoader.Core/Components/AnimationLayerComponent.cs @@ -33,12 +33,25 @@ public AnimationLayerComponent() { } /// public ref float Speed => ref GetRef(0x11C); + /// + /// If locked, gets the locked speed of this animation layer. + /// + public float? LockedSpeed + { + get + { + if (SpeedLocks.TryGetValue(Instance, out float lockedSpeed)) + return lockedSpeed; + return null; + } + } + /// /// Gets or sets whether the animation is paused. /// public bool Paused { - get => SpeedLocks.ContainsKey(Instance) && SpeedLocks[Instance] == 0f; + get => LockedSpeed == (float?)0f; set { if (value) Pause();