aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2020-07-04 12:17:53 -0500
committerGitHub <noreply@github.com>2020-07-04 12:17:53 -0500
commit43419933e54c8ee22da7eb04630661bb10145b46 (patch)
tree10d9e5a09a477f4e990669f2d10da0811ce5ad0d
parent44a4a2d23ede7986212558e9cc53387d6f3a1dc9 (diff)
parent6d4eb8774912ce81593e0503df3923d1bc6df699 (diff)
Merge pull request #175 from Crystalwarrior/feature/packet-music
More sensible music loop packet configuration
-rw-r--r--src/courtroom.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 7326948f..55b851e3 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -3010,13 +3010,17 @@ void Courtroom::handle_song(QStringList *p_contents)
(f_song_clear.lastIndexOf("/") + 1));
int n_char = f_contents.at(1).toInt();
- bool looping = true;
+ //Assume the song doesn't loop unless told otherwise (due to most outdated servers handling looping through serverside)
+ bool looping = false;
+ //Channel 0 is the 'master music', other channels would commonly be used for ambience
int channel = 0;
+ //No effects assumed by default - vanilla functionality
int effect_flags = 0;
+
if (n_char < 0 || n_char >= char_list.size()) {
int channel = 0;
- if (p_contents->length() > 3 && p_contents->at(3) != "-1")
- looping = false;
+ if (p_contents->length() > 3 && p_contents->at(3) == "1")
+ looping = true;
if (p_contents->length() >
4) // eyyy we want to change this song's CHANNEL huh
@@ -3042,10 +3046,8 @@ void Courtroom::handle_song(QStringList *p_contents)
str_show = p_contents->at(2);
}
}
- if (p_contents->length() > 3 && p_contents->at(3) != "-1") {
- // I am really confused why "-1" is "loop this song" and why anything else
- // passes as "don't loop" (if we even have this length) but alright
- looping = false;
+ if (p_contents->length() > 3 && p_contents->at(3) == "1") {
+ looping = true;
}
if (p_contents->length() >
4) // eyyy we want to change this song's CHANNEL huh