We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49df481 commit ccca1abCopy full SHA for ccca1ab
EXILED/Exiled.API/Features/Toys/Speaker.cs
@@ -147,6 +147,9 @@ public bool IsPaused
147
if (!playBackRoutine.IsRunning)
148
return;
149
150
+ if (playBackRoutine.IsAliveAndPaused == value)
151
+ return;
152
+
153
playBackRoutine.IsAliveAndPaused = value;
154
if (value)
155
OnPlaybackPaused?.Invoke();
@@ -447,14 +450,12 @@ private void OnToyRemoved(AdminToyBase toy)
447
450
448
451
AdminToyBase.OnRemoved -= OnToyRemoved;
449
452
- if (!isPlayBackInitialized)
- return;
-
453
Stop();
454
encoder?.Dispose();
455
encoder = null;
456
frame = null;
457
encoded = null;
458
459
isPlayBackInitialized = false;
460
}
461
0 commit comments