aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
authorSalanto <support@salanto.de>2021-03-22 20:45:10 +0100
committerSalanto <support@salanto.de>2021-03-22 20:45:10 +0100
commit298422d45344b8e92ca5a8dd7002ecf92e185ea6 (patch)
tree6c86ee15c957110306941b0cde7e3f27c0160542 /src/courtroom.cpp
parent2c5da36992ce4320964b3b2e3b2eaa709ac1be0b (diff)
Update courtroom.cpp to apply change requests
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 36ed19fa..e6bd57bd 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -3677,7 +3677,7 @@ void Courtroom::handle_song(QStringList *p_contents)
if (f_contents.size() < 2)
return;
- bool ok, ok2, ok3; //CharID,Channel, Effect
+ bool ok; // Used for charID, channel, effect check
bool looping = false; // No loop due to outdated server using serverside looping
int channel = 0; // Channel 0 is 'master music', other for ambient
int effect_flags = 0; // No effects by default - vanilla functionality
@@ -3701,19 +3701,19 @@ void Courtroom::handle_song(QStringList *p_contents)
if (p_contents->length() > 4) {
// eyyy we want to change this song's CHANNEL huh
// let the music player handle it if it's bigger than the channel list
- channel = p_contents->at(4).toInt(&ok2);
- if (!ok2)
+ channel = p_contents->at(4).toInt(&ok);
+ if (!ok)
return;
}
if (p_contents->length() > 5) {
// Flags provided to us by server such as Fade In, Fade Out, Sync Pos etc.
- effect_flags = p_contents->at(5).toInt(&ok3);
- if (!ok3)
+ effect_flags = p_contents->at(5).toInt(&ok);
+ if (!ok)
return;
}
bool is_stop = (f_song == "~stop.mp3");
- if (!(n_char < 0) && !(n_char >= char_list.size())) {
+ if (n_char > 0 && n_char < char_list.size()) {
QString str_char = char_list.at(n_char).name;
QString str_show = ao_app->get_showname(str_char);
if (p_contents->length() > 2) {