From 698dd624fb4d11b0d153ee9c308ba566963064cd Mon Sep 17 00:00:00 2001
From: MIDIMan <miditheman2.0@gmail.com>
Date: Fri, 8 Dec 2023 09:39:34 -0500
Subject: [PATCH] Add check for hud_powerups to SCR_ClosedCaptions

---
 src/screen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/screen.c b/src/screen.c
index 3c50ec67ea..b8aa63b9cb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -44,6 +44,8 @@
 // SRB2Kart
 #include "r_fps.h" // R_GetFramerateCap
 
+#include "lua_hud.h" // LUA_HudEnabled
+
 // --------------------------------------------
 // assembly or c drawer routines for 8bpp/16bpp
 // --------------------------------------------
@@ -565,6 +567,7 @@ void SCR_ClosedCaptions(void)
 			basey -= 8;
 		else if ((modeattacking == ATTACKING_NIGHTS)
 		|| (!(maptol & TOL_NIGHTS)
+		&& LUA_HudEnabled(hud_powerups)
 		&& ((cv_powerupdisplay.value == 2) // "Always"
 		 || (cv_powerupdisplay.value == 1 && !camera.chase)))) // "First-person only"
 			basey -= 16;
-- 
GitLab