aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorin1tiate <32779090+in1tiate@users.noreply.github.com>2021-04-11 15:36:32 -0500
committerGitHub <noreply@github.com>2021-04-11 15:36:32 -0500
commit33cf6dea262188ae7d9ca198ff4f3837234b8952 (patch)
treea058c0830280205bd5cf1b590385abcbeff4b62b
parent64acbd6ba0411cdce2c8d7c3ec4220c654f8d1be (diff)
Send "CC" packet when selecting "Spectator" from the character selection screen (#511)
If n_char is -1, don't wait for a server response.
-rw-r--r--src/charselect.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp
index 510d8c0a..d35f0ca2 100644
--- a/src/charselect.cpp
+++ b/src/charselect.cpp
@@ -168,14 +168,14 @@ void Courtroom::char_clicked(int n_char)
}
}
- if (n_char != m_cid) {
+ if (n_char != m_cid || n_char == -1) {
ao_app->send_server_packet(
new AOPacket("PW#" + ui_char_password->text() + "#%"));
ao_app->send_server_packet(
new AOPacket("CC#" + QString::number(ao_app->s_pv) + "#" +
QString::number(n_char) + "#" + get_hdid() + "#%"));
}
- else {
+ if (n_char == m_cid || n_char == -1) {
update_character(n_char);
enter_courtroom();
set_courtroom_size();