Fixed a bug where the character selection screen would pile up charicons.
- Also fixed the loading bar showing wrong values.
This commit is contained in:
parent
b99e9c18b2
commit
f81a9adc99
@ -175,6 +175,15 @@ void Courtroom::put_button_in_place(int starting, int chars_on_this_page)
|
|||||||
|
|
||||||
void Courtroom::character_loading_finished()
|
void Courtroom::character_loading_finished()
|
||||||
{
|
{
|
||||||
|
// Zeroeth, we'll clear any leftover characters from previous server visits.
|
||||||
|
if (ui_char_button_list.size() > 0)
|
||||||
|
{
|
||||||
|
foreach (AOCharButton* item, ui_char_button_list) {
|
||||||
|
delete item;
|
||||||
|
}
|
||||||
|
ui_char_button_list.clear();
|
||||||
|
}
|
||||||
|
|
||||||
// First, we'll make all the character buttons in the very beginning.
|
// First, we'll make all the character buttons in the very beginning.
|
||||||
// We also hide them all, so they can't be accidentally clicked.
|
// We also hide them all, so they can't be accidentally clicked.
|
||||||
// Later on, we'll be revealing buttons as we need them.
|
// Later on, we'll be revealing buttons as we need them.
|
||||||
|
@ -218,6 +218,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
|||||||
loaded_chars = 0;
|
loaded_chars = 0;
|
||||||
loaded_evidence = 0;
|
loaded_evidence = 0;
|
||||||
loaded_music = 0;
|
loaded_music = 0;
|
||||||
|
generated_chars = 0;
|
||||||
|
|
||||||
destruct_courtroom();
|
destruct_courtroom();
|
||||||
construct_courtroom();
|
construct_courtroom();
|
||||||
@ -419,7 +420,6 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
|||||||
int loading_value = int(((loaded_chars + generated_chars + loaded_music + loaded_evidence) / static_cast<double>(total_loading_size)) * 100);
|
int loading_value = int(((loaded_chars + generated_chars + loaded_music + loaded_evidence) / static_cast<double>(total_loading_size)) * 100);
|
||||||
w_lobby->set_loading_value(loading_value);
|
w_lobby->set_loading_value(loading_value);
|
||||||
}
|
}
|
||||||
w_courtroom->character_loading_finished();
|
|
||||||
|
|
||||||
send_server_packet(new AOPacket("RM#%"));
|
send_server_packet(new AOPacket("RM#%"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user