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