From 702b2758985d77750e905c7eadc88f6511ac58dd Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 22 Mar 2021 02:10:06 +0300 Subject: Fix chat messages being lost to the Ether if instant objection was used, or you switched an area during queue being parsed. (Your IC logs will be caught up to speed instead) --- include/courtroom.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 21191e5..9e0ae58 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -226,6 +226,9 @@ public: // Parse the chat message packet and unpack it into the m_chatmessage[ITEM] format void unpack_chatmessage(QStringList p_contents); + // Skip the current queue, adding all the queue messages to the logs if desynchronized logs are disabled + void skip_chatmessage_queue(); + enum LogMode { IO_ONLY, DISPLAY_ONLY, -- cgit From 37de947a3df3c90b27562515f5d3a1e05ad40de5 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Wed, 24 Mar 2021 23:05:09 +0300 Subject: Mark ui_selector, ui_passworded, ui_taken for evidence and character select as static-only due to massice performance overhead for no substantial benefit --- include/aoimage.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/aoimage.h b/include/aoimage.h index 70ff1fc..b75eee1 100644 --- a/include/aoimage.h +++ b/include/aoimage.h @@ -11,7 +11,7 @@ class AOImage : public QLabel { public: - AOImage(QWidget *parent, AOApplication *p_ao_app); + AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static = false); ~AOImage(); QWidget *m_parent; @@ -20,6 +20,8 @@ public: QString path; + bool is_static = false; + bool set_image(QString p_image, QString p_misc = ""); void set_size_and_pos(QString identifier); }; -- cgit From 48093c3f2b7068f3dd20baa101614a52b855bc04 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Wed, 24 Mar 2021 23:05:46 +0300 Subject: Remove useless code for extra ui_selector that is not used --- include/courtroom.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 9e0ae58..7e31b73 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -755,7 +755,6 @@ private: QVector ui_char_button_list; QVector ui_char_button_list_filtered; - AOImage *ui_selector; AOButton *ui_back_to_lobby; -- cgit From 6ec4e032e09a6e6135fed3faad76cc46598ee96f Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 24 Mar 2021 18:52:11 -0500 Subject: Version bump aoapplication.h --- include/aoapplication.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 9fa8c75..493f1c9 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -511,7 +511,7 @@ public: private: const int RELEASE = 2; const int MAJOR_VERSION = 9; - const int MINOR_VERSION = 0; + const int MINOR_VERSION = 1; QVector server_list; QVector favorite_list; -- cgit From e517a365d59a46f213e5f053404ecb1904f63ab6 Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Mon, 19 Apr 2021 19:27:25 -0500 Subject: don't set a mask on elements affected by offsets (#524) --- include/aolayer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/aolayer.h b/include/aolayer.h index 1984b77..f42642c 100644 --- a/include/aolayer.h +++ b/include/aolayer.h @@ -52,6 +52,7 @@ public: bool force_continuous = false; Qt::TransformationMode transform_mode = Qt::FastTransformation; // transformation mode to use for this image bool stretch = false; // Should we stretch/squash this image to fill the screen? + bool masked = true; // Set a mask to the dimensions of the widget? // Set the movie's image to provided paths, preparing for playback. void start_playback(QString p_image); -- cgit From fb4a5e0656cf1ad023b761139f30ecf3a584f56e Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Wed, 21 Apr 2021 02:54:08 +0300 Subject: Fix log_chatmessage referring to the global m_chatmessage instead of the local variables that should be sent to it at the point of the func being called. (#530) --- include/courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 7e31b73..9da465a 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -235,7 +235,7 @@ public: DISPLAY_AND_IO }; // Log the message contents and information such as evidence presenting etc. into the log file, the IC log, or both. - void log_chatmessage(QString f_message, int f_char_id, QString f_showname = "", int f_color = 0, LogMode f_log_mode=IO_ONLY); + void log_chatmessage(QString f_message, int f_char_id, QString f_showname = "", QString f_char = "", QString f_objection_mod = "", int f_evi_id = 0, int f_color = 0, LogMode f_log_mode=IO_ONLY); // Log the message contents and information such as evidence presenting etc. into the IC logs void handle_callwords(); -- cgit From 43340e88695b2adc7b8fc8141540178727fd8869 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Thu, 22 Apr 2021 23:46:55 -0500 Subject: move timer reset to its own method --- include/demoserver.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/demoserver.h b/include/demoserver.h index 3dc645b..0d4f0e4 100644 --- a/include/demoserver.h +++ b/include/demoserver.h @@ -24,6 +24,7 @@ public: private: void handle_packet(AOPacket packet); void load_demo(QString filename); + void reset_all_timers(); QTcpServer* tcp_server; QTcpSocket* client_sock = nullptr; -- cgit From 9fbe899c0e6ff464d91c2b2171eebb8fb879facb Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Fri, 23 Apr 2021 09:55:04 +0300 Subject: Automatically fix desynced demo files with issues pre-#496 PR (#532) * Implement a demo auto-fixing solution. If the client detects a pre-2.9.1 demo file, it will prompt the user if they wish to correct it, since otherwise the demo will be desynched from reality. The aforementioned issue was fixed in https://github.com/AttorneyOnline/AO2-Client/pull/496 however 2.9.0 still has incorrect demo recording. Fix potential memory leak by not flushing and closing the demo file after opening it for reading. * backup broken demo file before fixing it * comments ahoy Co-authored-by: in1tiate --- include/demoserver.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/demoserver.h b/include/demoserver.h index 3dc645b..f41084e 100644 --- a/include/demoserver.h +++ b/include/demoserver.h @@ -10,6 +10,7 @@ #include #include #include +#include class DemoServer : public QObject { -- cgit From 60daac3823735dace691f7a065c3759dc535f60a Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Fri, 23 Apr 2021 14:29:16 -0500 Subject: Move other duplicate reset calls to their own method --- include/demoserver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/demoserver.h b/include/demoserver.h index e5d5712..cadc52d 100644 --- a/include/demoserver.h +++ b/include/demoserver.h @@ -25,7 +25,7 @@ public: private: void handle_packet(AOPacket packet); void load_demo(QString filename); - void reset_all_timers(); + void reset_state(); QTcpServer* tcp_server; QTcpSocket* client_sock = nullptr; -- cgit From 6e3435ddba0bc9a2ca71109cb75aa4edbaedfce2 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Fri, 23 Apr 2021 16:09:25 -0500 Subject: Add setting for default scaling method --- include/aoapplication.h | 3 +++ include/aooptionsdialog.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 493f1c9..16bbb9f 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -490,6 +490,9 @@ public: // Get if the theme is animated bool get_animated_theme(); + // Get the default scaling method + QString get_default_scaling(); + // Currently defined subtheme QString subtheme; diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index e88ce54..45fc86c 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -85,6 +85,8 @@ private: QCheckBox *ui_discord_cb; QLabel *ui_language_label; QComboBox *ui_language_combobox; + QLabel *ui_scaling_label; + QComboBox *ui_scaling_combobox; QLabel *ui_shake_lbl; QCheckBox *ui_shake_cb; -- cgit From 433b7f33159b9ee86b2ea0192869ea0bdbeb2f05 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sat, 24 Apr 2021 01:44:52 +0300 Subject: Deprecate tick_ms and use actual milliseconds rather than arbitrary 60ms ticks for char.ini [Time] Fix an extremely weird case where CharLayer::Play() was not called even on the CharLayer class (I don't understand why inheritance was straight up just ignored) Fix using preanims with static images just breaking everything Deprecate weird insanity [Time] with the % sign BS (What was this for again? Literally no one used this nor was aware of it) Fix text_stay_time timer firing even if we're immediate Just in case, stop the text delay timer when start_chat_ticking is called --- include/aoapplication.h | 4 ---- include/aolayer.h | 4 ---- 2 files changed, 8 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 493f1c9..b0f7e08 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -378,10 +378,6 @@ public: // Returns the preanim duration of p_char's p_emote int get_preanim_duration(QString p_char, QString p_emote); - // Same as above, but only returns if it has a % in front(refer to Preanims - // section in the manual) - int get_ao2_preanim_duration(QString p_char, QString p_emote); - // Not in use int get_text_delay(QString p_char, QString p_emote); diff --git a/include/aolayer.h b/include/aolayer.h index f42642c..f3ecebf 100644 --- a/include/aolayer.h +++ b/include/aolayer.h @@ -104,10 +104,6 @@ protected: QElapsedTimer actual_time; - // Usually used to turn seconds into milliseconds such as for [Time] tag in - // char.ini (which is no longer used) - const int tick_ms = 60; - // These are the X and Y values before they are fixed based on the sprite's // width. int x = 0; -- cgit From 99d083d114844ce3f8274663da212784595421ed Mon Sep 17 00:00:00 2001 From: MangosArentLiterature <58055358+MangosArentLiterature@users.noreply.github.com> Date: Wed, 28 Apr 2021 00:43:06 -0500 Subject: Add default shownames Adds a new setting to config.ini to set a default showname. This works similarly to default username, but for IC shownames, setting the client's showname automatically. Like default username, this has a 30 character limit. * Adds a new option to config.ini, default_showname. * Adds this setting to the options dialog. * Adds get_default_showname() for retrieving this showname. * Sets the showname box to this value upon joining a server. --- include/aoapplication.h | 3 +++ include/aooptionsdialog.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 16bbb9f..7715475 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -278,6 +278,9 @@ public: // Returns whether the user would like to have custom shownames on by default. bool get_showname_enabled_by_default(); + //Returns the showname the user may have set in config.ini. + QString get_default_showname(); + // Returns the list of words in callwords.ini QStringList get_call_words(); diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index 45fc86c..a6c8b8e 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -78,6 +78,8 @@ private: QLabel *ui_username_lbl; QLabel *ui_showname_lbl; QCheckBox *ui_showname_cb; + QLabel *ui_default_showname_lbl; + QLineEdit *ui_default_showname_textbox; QFrame *ui_net_divider; QLabel *ui_ms_lbl; QLineEdit *ui_ms_textbox; -- cgit From 8a9bb6dc6923a3a9a77bb8a0f397edeac8407a8a Mon Sep 17 00:00:00 2001 From: Salanto Date: Tue, 4 May 2021 05:39:50 +0200 Subject: Add Asset Packet This packet is used to send the client the URL of an online content repository, if available. --- include/aoapplication.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 7f7f3e1..835c7fd 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -501,6 +501,16 @@ public: // The file name of the log file in base/logs. QString log_filename; + /** + * @brief A QString of an URL that defines the content repository + * send by the server. + * + * @details Introduced in Version 2.9.2. + * Addresses the issue of contenturl devlivery for WebAO + * without relying on someone adding the link manually. + */ + QString asset_url; + void initBASS(); static void load_bass_opus_plugin(); static void CALLBACK BASSreset(HSTREAM handle, DWORD channel, DWORD data, -- cgit From b8b6d3cbb32801fed87052e60fce73ea24cc684d Mon Sep 17 00:00:00 2001 From: Salanto Date: Wed, 5 May 2021 00:42:48 +0200 Subject: Add musclist streaming support Attempt Nr. 2 - Based on #548 and #501 + Allows client to use a remote source as a last resort if the file can't be found locally. + Adds a check if the target file is missing. This implementation assumed the streaming source to be structured like a webao content respository --- include/aomusicplayer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index 36031f1..f899b9a 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -25,7 +25,7 @@ public: int loop_end[4] = {0, 0, 0, 0}; public slots: - void play(QString p_song, int channel = 0, bool loop = false, + int play(QString p_song, int channel = 0, bool loop = false, int effect_flags = 0); void stop(int channel = 0); -- cgit