From 963e32109503fe7bb83c5a4111913e1d489db608 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 4 Nov 2019 15:38:54 +0300 Subject: [PATCH] If def/pro/jud/hld/hlp are missing, put the character in pos wit instead of showing broken bg. --- src/courtroom.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 30c391f..2efa34c 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2701,7 +2701,7 @@ void Courtroom::set_scene(QString f_desk_mod, QString f_side) QString f_background = "witnessempty"; QString f_desk_image = "stand"; - if (f_side == "def") + if (f_side == "def" && file_exists(ao_app->get_image_suffix(ao_app->get_background_path("defenseempty")))) { f_background = "defenseempty"; if (is_ao2_bg) @@ -2709,7 +2709,7 @@ void Courtroom::set_scene(QString f_desk_mod, QString f_side) else f_desk_image = "bancodefensa"; } - else if (f_side == "pro") + else if (f_side == "pro" && file_exists(ao_app->get_image_suffix(ao_app->get_background_path("prosecutorempty")))) { f_background = "prosecutorempty"; if (is_ao2_bg) @@ -2717,17 +2717,17 @@ void Courtroom::set_scene(QString f_desk_mod, QString f_side) else f_desk_image = "bancoacusacion"; } - else if (f_side == "jud") + else if (f_side == "jud" && file_exists(ao_app->get_image_suffix(ao_app->get_background_path("judgestand")))) { f_background = "judgestand"; f_desk_image = "judgedesk"; } - else if (f_side == "hld") + else if (f_side == "hld" && file_exists(ao_app->get_image_suffix(ao_app->get_background_path("helperstand")))) { f_background = "helperstand"; f_desk_image = "helperdesk"; } - else if (f_side == "hlp") + else if (f_side == "hlp" && file_exists(ao_app->get_image_suffix(ao_app->get_background_path("prohelperstand")))) { f_background = "prohelperstand"; f_desk_image = "prohelperdesk";