From cec1a99d3bd22eeb0925b08f68348ef4ba838a80 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 2 Aug 2020 19:28:30 -0700 Subject: [PATCH] Don't draw activity zone or trophy text when cutscene is running This fixes a possible graphical issue where the "Press ENTER to activate terminal" prompt gets drawn on top of the "- Press ACTION to advance text -" prompt, which looks bad. Trophy text gets drawn on top, too, so there's a check there as well. I've also made it so the activity prompt doesn't get drawn if the player doesn't have control. After all, what use is it to say "press ENTER" if the player isn't allowed to? --- desktop_version/src/Render.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index faeea71f..96072b2e 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1675,7 +1675,7 @@ void gamerender() } float act_alpha = graphics.lerp(game.prev_act_fade, game.act_fade) / 10.0f; - if (game.activeactivity > -1) + if (game.activeactivity > -1 && game.hascontrol && !script.running) { game.activity_lastprompt = obj.blocks[game.activeactivity].prompt; game.activity_r = obj.blocks[game.activeactivity].r; @@ -1684,13 +1684,13 @@ void gamerender() graphics.drawtextbox(16, 4, 36, 3, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha); graphics.Print(5, 12, game.activity_lastprompt, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha, true); } - else if(game.act_fade>5 || game.prev_act_fade>5) + else if((game.act_fade>5 || game.prev_act_fade>5) && game.hascontrol && !script.running) { graphics.drawtextbox(16, 4, 36, 3, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha); graphics.Print(5, 12, game.activity_lastprompt, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha, true); } - if (obj.trophytext > 0 || obj.oldtrophytext > 0) + if ((obj.trophytext > 0 || obj.oldtrophytext > 0) && !script.running) { graphics.drawtrophytext(); }