Skip to content

Commit

Permalink
Merge pull request #322 from Chrezm/feature/0/allow-character-list-re…
Browse files Browse the repository at this point in the history
…load

Allow character list reload
  • Loading branch information
Chrezm authored Aug 21, 2022
2 parents 54b82e9 + 2547b58 commit c8f6306
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/server_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,19 @@ void AOApplication::_p_handle_server_packet(DRPacket p_packet)
char_type l_chr;
l_chr.name = i_chr_name;
l_chr_list.append(std::move(l_chr));
m_lobby->set_loading_text("Loading chars:\n" + QString::number(++m_loaded_characters) + "/" + QString::number(m_character_count));
}
m_courtroom->set_character_list(l_chr_list);
m_loaded_characters = m_character_count;

int total_loading_size = m_character_count + m_evidence_count + m_music_count;
int loading_value = (m_loaded_characters / static_cast<double>(total_loading_size)) * 100;
m_lobby->set_loading_value(loading_value);
if (is_lobby_constructed)
{
m_lobby->set_loading_text("Loading chars:\n" + QString::number(m_loaded_characters) + "/" + QString::number(m_character_count));
int total_loading_size = m_character_count + m_evidence_count + m_music_count;
int loading_value = (m_loaded_characters / static_cast<double>(total_loading_size)) * 100;
m_lobby->set_loading_value(loading_value);

send_server_packet(DRPacket("RM"));
send_server_packet(DRPacket("RM"));
}
}
else if (l_header == "SM") // TODO remove block for 1.2.0+
{
Expand Down

0 comments on commit c8f6306

Please sign in to comment.