aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-11-04 15:38:54 +0300
committerCrystalwarrior <varsash@gmail.com>2019-11-04 15:38:54 +0300
commit963e32109503fe7bb83c5a4111913e1d489db608 (patch)
tree869b00cbe0d0775906dd7ec382d060bc393c9cc2
parent773a61f3d4ce2284b2d5d753b5c696f7bd44a531 (diff)
If def/pro/jud/hld/hlp are missing, put the character in pos wit instead of showing broken bg.
-rw-r--r--src/courtroom.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 30c391f0..2efa34cb 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";