From c29d7c7d149ccc3d5d297f2679b5a8b89e7ac910 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 24 Aug 2020 18:13:57 -0700 Subject: [PATCH] De-duplicate activity zone rendering, don't ignore act_fade This is a follow-up to #421. The game would draw the activity zone if there was one active at all, and would ignore game.act_fade. Normally this wouldn't be a problem, but since #421, it's possible that there could be an active activity zone but game.act_fade would still be 5. This would happen if you entered a new activity zone while a cutscene was running. To fix this, just make it so that the prompt gets drawn on its own and only depends on the state of game.act_fade (or game.prev_act_fade), and won't be unconditionally drawn if there's an active activity zone. As a bonus, this de-duplicates the drawing of the activity prompt, so it's no longer copy-pasted. --- desktop_version/src/Render.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 19354d28..321f422e 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1683,10 +1683,8 @@ void gamerender() game.activity_r = obj.blocks[game.activeactivity].r; game.activity_g = obj.blocks[game.activeactivity].g; game.activity_b = obj.blocks[game.activeactivity].b; - 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) + if(game.act_fade>5 || game.prev_act_fade>5) { 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);