From b340591ccd6786f43e7e2b7913eba96ae27f1365 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Sat, 20 Aug 2022 15:36:30 +0200 Subject: [PATCH] Fix inability to hide HUD. --- language.version | 4 ++-- zscript/hud/swwm_hud.zsc | 17 ++++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/language.version b/language.version index 41d2acf1f..89b25e200 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r349 \cu(Sat 20 Aug 08:13:37 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r349 \cu(2022-08-20 08:13:37)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r350 \cu(Sat 20 Aug 15:36:30 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r350 \cu(2022-08-20 15:36:30)\c-"; diff --git a/zscript/hud/swwm_hud.zsc b/zscript/hud/swwm_hud.zsc index 2bb5fa690..7d0043425 100644 --- a/zscript/hud/swwm_hud.zsc +++ b/zscript/hud/swwm_hud.zsc @@ -97,7 +97,6 @@ Class SWWMStatusBar : BaseStatusBar double FrameTime; double PrevFrame; int chatopen; - bool camhidden; int pausetime; Vector2 pausepos, pausedir; @@ -3302,7 +3301,6 @@ Class SWWMStatusBar : BaseStatusBar double CurFrame = MSTimeF(); FrameTime = (CurFrame-PrevFrame)/1000.; if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); - camhidden = !(players[consoleplayer].Camera is 'PlayerPawn'); hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.); ss = (Screen.GetWidth()/hs,Screen.GetHeight()/hs); margin = clamp(swwm_hudmargin,0,20); @@ -3311,25 +3309,18 @@ Class SWWMStatusBar : BaseStatusBar ss1 = (Screen.GetWidth()/hs1,Screen.GetHeight()/hs1); ss2 = (Screen.GetWidth()/hs2,Screen.GetHeight()/hs2); FracTic = TicFrac; - if ( camhidden ) + if ( (players[consoleplayer].Camera is 'Demolitionist') && (state <= HUD_Fullscreen) ) { if ( hnd ) hnd.DrawBossBar(self); - DrawPickups(); - DrawDeath(); - DrawMessages(0.); - } - else - { DrawTarget(); DrawTopStuff(); DrawInventory(); DrawStatus(); DrawWeapons(); - if ( hnd ) hnd.DrawBossBar(self); - DrawPickups(); - double malph = DrawDeath(); - DrawMessages(malph); } + DrawPickups(); + double malph = DrawDeath(); + DrawMessages(malph); PrevFrame = CurFrame; } }