|
@@ -12,7 +12,7 @@
|
|
#pragma newdecls required
|
|
#pragma newdecls required
|
|
#include <round_end_music>
|
|
#include <round_end_music>
|
|
|
|
|
|
-#define PLUGIN_VERSION "0.4.1"
|
|
|
|
|
|
+#define PLUGIN_VERSION "0.4.2"
|
|
public Plugin myinfo = {
|
|
public Plugin myinfo = {
|
|
name = "[CSRD] Round End Music",
|
|
name = "[CSRD] Round End Music",
|
|
author = "nosoop",
|
|
author = "nosoop",
|
|
@@ -21,6 +21,7 @@ public Plugin myinfo = {
|
|
url = "https://pika.nom-nom-nom.us/"
|
|
url = "https://pika.nom-nom-nom.us/"
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// Note: All lists share the same handle reference, they aren't cloned.
|
|
bool g_bQueueLocked = false;
|
|
bool g_bQueueLocked = false;
|
|
ArrayList g_QueuedSongs, g_ActiveSongs, g_PlayedSongs;
|
|
ArrayList g_QueuedSongs, g_ActiveSongs, g_PlayedSongs;
|
|
|
|
|
|
@@ -231,8 +232,11 @@ void EmitRoundEndMusic(MusicEntry song) {
|
|
if (g_PlayedSongs.FindValue(song) == -1) {
|
|
if (g_PlayedSongs.FindValue(song) == -1) {
|
|
g_PlayedSongs.Push(song);
|
|
g_PlayedSongs.Push(song);
|
|
}
|
|
}
|
|
-
|
|
|
|
- g_ActiveSongs.Erase(0);
|
|
|
|
|
|
+
|
|
|
|
+ int pos;
|
|
|
|
+ if ( (pos = g_ActiveSongs.FindValue(song)) != -1 ) {
|
|
|
|
+ g_ActiveSongs.Erase(pos);
|
|
|
|
+ }
|
|
|
|
|
|
FireOnREMPlayedPostEvent(song);
|
|
FireOnREMPlayedPostEvent(song);
|
|
}
|
|
}
|