aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeifa <26681464+TrickyLeifa@users.noreply.github.com>2024-06-30 23:20:50 +0200
committerGitHub <noreply@github.com>2024-06-30 23:20:50 +0200
commit2b970ec4a315fa22f07105fffce305480de11fb6 (patch)
treec13a3a0d23a157520114e296c4c2d27e3135b57c
parentc1f120adfb7dfc82f173826383a3a8064d5f8dc1 (diff)
parent074490e347f306ff0d48c3abae499346498af75c (diff)
Merge pull request #977 from AttorneyOnline/fix-areaswitch-bs
Fix characters not being hidden on displayable background change
-rw-r--r--src/courtroom.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 221b7c79..c2dbde04 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1438,7 +1438,9 @@ void Courtroom::set_background(QString p_background, bool display)
{
ui_vp_speedlines->hide();
ui_vp_player_char->stopPlayback();
+ ui_vp_player_char->hide();
ui_vp_sideplayer_char->stopPlayback();
+ ui_vp_sideplayer_char->hide();
ui_vp_effect->stopPlayback();
ui_vp_effect->hide();
ui_vp_message->hide();
@@ -2840,6 +2842,7 @@ void Courtroom::display_pair_character(QString other_charid, QString other_offse
// Play the other pair character's idle animation
ui_vp_sideplayer_char->loadCharacterEmote(m_chatmessage[OTHER_NAME], m_chatmessage[OTHER_EMOTE], kal::CharacterAnimationLayer::IdleEmote);
+ ui_vp_sideplayer_char->show();
ui_vp_sideplayer_char->setPlayOnce(false);
// Flip the pair character
@@ -3068,6 +3071,7 @@ void Courtroom::do_transition(QString p_desk_mod, QString oldPosId, QString newP
};
ui_vp_player_char->loadCharacterEmote(m_chatmessage[CHAR_NAME], m_chatmessage[EMOTE], kal::CharacterAnimationLayer::IdleEmote);
+ ui_vp_player_char->show();
ui_vp_player_char->setFlipped(m_chatmessage[FLIP].toInt() == 1);
calculate_offset_and_setup_layer(ui_vp_player_char, scaled_new_pos, m_chatmessage[SELF_OFFSET]);
@@ -3476,6 +3480,7 @@ void Courtroom::handle_ic_speaking()
filename = m_chatmessage[EMOTE];
ui_vp_player_char->loadCharacterEmote(m_chatmessage[CHAR_NAME], m_chatmessage[EMOTE], kal::CharacterAnimationLayer::TalkEmote);
ui_vp_player_char->setPlayOnce(false);
+ ui_vp_player_char->show();
ui_vp_player_char->startPlayback();
// Set the anim state accordingly
}
@@ -3486,6 +3491,7 @@ void Courtroom::handle_ic_speaking()
filename = m_chatmessage[EMOTE];
ui_vp_player_char->loadCharacterEmote(m_chatmessage[CHAR_NAME], m_chatmessage[EMOTE], kal::CharacterAnimationLayer::IdleEmote);
ui_vp_player_char->setPlayOnce(false);
+ ui_vp_player_char->show();
ui_vp_player_char->startPlayback();
}