fixed some crashes
This commit is contained in:
parent
be017b7278
commit
b524819e5a
@ -13,7 +13,7 @@ RC_ICONS = logo.ico
|
||||
TARGET = Attorney_Online_remake
|
||||
TEMPLATE = app
|
||||
|
||||
VERSION = 2.1.4.0
|
||||
VERSION = 2.1.5.0
|
||||
|
||||
SOURCES += main.cpp\
|
||||
lobby.cpp \
|
||||
|
@ -62,6 +62,8 @@ public:
|
||||
int music_list_size = 0;
|
||||
int loaded_music = 0;
|
||||
|
||||
bool courtroom_loaded = false;
|
||||
|
||||
//////////////////versioning///////////////
|
||||
|
||||
int get_release() {return RELEASE;}
|
||||
@ -118,7 +120,7 @@ public:
|
||||
private:
|
||||
const int RELEASE = 2;
|
||||
const int MAJOR_VERSION = 1;
|
||||
const int MINOR_VERSION = 4;
|
||||
const int MINOR_VERSION = 5;
|
||||
|
||||
QString user_theme = "default";
|
||||
|
||||
|
@ -19,7 +19,6 @@ AOCharMovie::AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_
|
||||
this->setMovie(m_movie);
|
||||
|
||||
connect(m_movie, SIGNAL(frameChanged(int)), this, SLOT(frame_change(int)));
|
||||
connect(m_movie, SIGNAL(finished()), this, SLOT(movie_done()));
|
||||
connect(preanim_timer, SIGNAL(timeout()), this, SLOT(timer_done()));
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,5 @@ void AOImage::set_scaled_image(QString p_image)
|
||||
|
||||
QPixmap f_pixmap(final_image_path);
|
||||
|
||||
qDebug() << "aoimage width" << this->width();
|
||||
qDebug() << "aoimage height" << this->height();
|
||||
|
||||
this->setPixmap(f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio));
|
||||
}
|
||||
|
@ -1165,6 +1165,7 @@ void Courtroom::play_preanim()
|
||||
|
||||
if (!file_exists(ao_app->get_character_path(f_char) + f_preanim.toLower() + ".gif"))
|
||||
{
|
||||
anim_state = 1;
|
||||
preanim_done();
|
||||
qDebug() << "could not find " + ao_app->get_character_path(f_char) + f_preanim + ".gif";
|
||||
return;
|
||||
|
@ -186,6 +186,8 @@ private:
|
||||
//whether the ooc chat is server or master chat, true is server
|
||||
bool server_ooc = true;
|
||||
|
||||
|
||||
|
||||
QString current_background = "gs4";
|
||||
|
||||
AOMusicPlayer *music_player;
|
||||
|
@ -62,7 +62,7 @@ void AOApplication::ms_packet_received(AOPacket *p_packet)
|
||||
{
|
||||
w_lobby->append_chatmessage(message_line);
|
||||
}
|
||||
if (courtroom_constructed)
|
||||
if (courtroom_constructed && courtroom_loaded)
|
||||
{
|
||||
w_courtroom->append_ms_chatmessage(message_line);
|
||||
}
|
||||
@ -129,6 +129,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
||||
QString f_hdid;
|
||||
f_hdid = get_hdid();
|
||||
|
||||
encryption_needed = true;
|
||||
|
||||
AOPacket *hi_packet = new AOPacket("HI#" + f_hdid + "#%");
|
||||
send_server_packet(hi_packet);
|
||||
}
|
||||
@ -200,6 +202,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
||||
destruct_courtroom();
|
||||
construct_courtroom();
|
||||
|
||||
courtroom_loaded = false;
|
||||
|
||||
QString window_title = "Attorney Online 2";
|
||||
int selected_server = w_lobby->get_selected_server();
|
||||
|
||||
@ -433,6 +437,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
||||
|
||||
w_courtroom->done_received();
|
||||
|
||||
courtroom_loaded = true;
|
||||
|
||||
destruct_lobby();
|
||||
}
|
||||
else if (header == "BN")
|
||||
@ -454,7 +460,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
||||
}
|
||||
else if (header == "MS")
|
||||
{
|
||||
if (courtroom_constructed)
|
||||
if (courtroom_constructed && courtroom_loaded)
|
||||
w_courtroom->handle_chatmessage(&p_packet->get_contents());
|
||||
}
|
||||
else if (header == "MC")
|
||||
|
Loading…
Reference in New Issue
Block a user