From 496831e428584b1f7277c2f3f25060484833ca83 Mon Sep 17 00:00:00 2001 From: Madpeterz <57852827+Madpeterz@users.noreply.github.com> Date: Tue, 29 Dec 2020 18:52:38 +0000 Subject: [PATCH] adjust the locking for animations maybe fix the bug? --- Core/bottypes/AnimationsBot.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/bottypes/AnimationsBot.cs b/Core/bottypes/AnimationsBot.cs index a79a0a6..a0405b6 100644 --- a/Core/bottypes/AnimationsBot.cs +++ b/Core/bottypes/AnimationsBot.cs @@ -19,13 +19,14 @@ namespace BSB.bottypes } public override void ResetAnimations() - { + { + List copyAnyimations = active_animations; + foreach (UUID ani in copyAnyimations) + { + Client.Self.AnimationStop(ani, true); + } lock (active_animations) { - foreach (UUID ani in active_animations) - { - Client.Self.AnimationStop(ani, true); - } active_animations.Clear(); } }