Skip to content

Commit ccebb77

Browse files
committed
fixed a freeze-related objection bug + a bug where < and > would not display in chatbox. version 2.3.0 ready for release
1 parent 0c19374 commit ccebb77

6 files changed

Lines changed: 40 additions & 37 deletions

File tree

Attorney_Online_remake.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RC_ICONS = logo.ico
1313
TARGET = Attorney_Online_remake
1414
TEMPLATE = app
1515

16-
VERSION = 2.2.5.0
16+
VERSION = 2.3.0.0
1717

1818
SOURCES += main.cpp\
1919
lobby.cpp \

aoapplication.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ class AOApplication : public QApplication
128128

129129
private:
130130
const int RELEASE = 2;
131-
const int MAJOR_VERSION = 2;
132-
const int MINOR_VERSION = 5;
131+
const int MAJOR_VERSION = 3;
132+
const int MINOR_VERSION = 0;
133133

134134
QString user_theme = "default";
135135

aomovie.cpp

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,37 @@ AOMovie::AOMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent)
1515
connect(m_movie, SIGNAL(frameChanged(int)), this, SLOT(frame_change(int)));
1616
}
1717

18-
void AOMovie::play(QString p_gif, QString p_char)
18+
void AOMovie::set_play_once(bool p_play_once)
1919
{
20-
play_once = true;
21-
22-
m_movie->stop();
23-
24-
QString default_path = ao_app->get_default_theme_path() + p_gif + ".gif";
25-
QString gif_path;
26-
27-
if (p_gif == "custom")
28-
gif_path = ao_app->get_character_path(p_char) + "custom.gif";
29-
else
30-
gif_path = ao_app->get_theme_path() + p_gif + ".gif";
31-
32-
33-
if (file_exists(gif_path))
34-
m_movie->setFileName(gif_path);
35-
else
36-
m_movie->setFileName(default_path);
37-
38-
this->show();
39-
m_movie->start();
20+
play_once = p_play_once;
4021
}
4122

42-
void AOMovie::play(QString p_gif, bool p_play_once)
23+
void AOMovie::play(QString p_gif, QString p_char)
4324
{
44-
play_once = p_play_once;
45-
4625
m_movie->stop();
4726

48-
QString default_path = ao_app->get_default_theme_path() + p_gif + ".gif";
49-
QString gif_path = ao_app->get_theme_path() + p_gif + ".gif";
27+
QString gif_path;
5028

51-
if (file_exists(gif_path))
52-
m_movie->setFileName(gif_path);
29+
QString custom_path = ao_app->get_character_path(p_char) + p_gif + ".gif";
30+
QString theme_path = ao_app->get_theme_path() + p_gif + ".gif";
31+
QString default_theme_path = ao_app->get_default_theme_path() + p_gif + ".gif";
32+
QString placeholder_path = ao_app->get_theme_path() + "placeholder.gif";
33+
QString default_placeholder_path = ao_app->get_default_theme_path() + "placeholder.gif";
34+
35+
if (file_exists(custom_path))
36+
gif_path = custom_path;
37+
else if (file_exists(theme_path))
38+
gif_path = theme_path;
39+
else if (file_exists(default_theme_path))
40+
gif_path = default_theme_path;
41+
else if (file_exists(placeholder_path))
42+
gif_path = placeholder_path;
43+
else if (file_exists(default_placeholder_path))
44+
gif_path = default_placeholder_path;
5345
else
54-
m_movie->setFileName(default_path);
46+
gif_path = "";
47+
48+
m_movie->setFileName(gif_path);
5549

5650
this->show();
5751
m_movie->start();

aomovie.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class AOMovie : public QLabel
1414
public:
1515
AOMovie(QWidget *p_parent, AOApplication *p_ao_app);
1616

17-
void play(QString p_gif, QString p_char = "null");
18-
void play(QString p_gif, bool p_play_once);
17+
void set_play_once(bool p_play_once);
18+
void play(QString p_gif, QString p_char = "");
1919
void combo_resize(int w, int h);
2020
void stop();
2121

courtroom.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
5858
ui_viewport = new QWidget(this);
5959
ui_vp_background = new AOScene(ui_viewport, ao_app);
6060
ui_vp_speedlines = new AOMovie(ui_viewport, ao_app);
61+
ui_vp_speedlines->set_play_once(false);
6162
ui_vp_player_char = new AOCharMovie(ui_viewport, ao_app);
6263
ui_vp_desk = new AOScene(ui_viewport, ao_app);
6364
ui_vp_legacy_desk = new AOScene(ui_viewport, ao_app);
@@ -1003,7 +1004,9 @@ void Courtroom::handle_chatmessage_2()
10031004
ui_vp_speedlines->stop();
10041005
ui_vp_player_char->stop();
10051006

1006-
QString f_showname = ao_app->get_showname(char_list.at(m_chatmessage[CHAR_ID].toInt()).name);
1007+
QString real_name = char_list.at(m_chatmessage[CHAR_ID].toInt()).name;
1008+
1009+
QString f_showname = ao_app->get_showname(real_name);
10071010

10081011
ui_vp_showname->setText(f_showname);
10091012

@@ -1060,9 +1063,9 @@ void Courtroom::handle_chatmessage_3()
10601063
if (side == "pro" ||
10611064
side == "hlp" ||
10621065
side == "wit")
1063-
ui_vp_speedlines->play("prosecution_speedlines", false);
1066+
ui_vp_speedlines->play("prosecution_speedlines");
10641067
else
1065-
ui_vp_speedlines->play("defense_speedlines", false);
1068+
ui_vp_speedlines->play("defense_speedlines");
10661069

10671070
}
10681071

@@ -1227,6 +1230,10 @@ void Courtroom::chat_tick()
12271230

12281231
if (f_character == " ")
12291232
ui_vp_message->insertPlainText(" ");
1233+
else if (f_character == "<")
1234+
ui_vp_message->insertHtml("&lt;");
1235+
else if (f_character == ">")
1236+
ui_vp_message->insertHtml("&gt;");
12301237
else if (m_chatmessage[TEXT_COLOR].toInt() == RAINBOW)
12311238
{
12321239
QString html_color;

networkmanager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class NetworkManager : public QObject
2727
bool partial_packet = false;
2828
QString temp_packet = "";
2929

30+
unsigned int s_decryptor = 5;
31+
3032
void connect_to_master();
3133
void connect_to_server(server_type p_server);
3234

0 commit comments

Comments
 (0)