Fix inability to hide HUD.

This commit is contained in:
Mari the Deer 2022-08-20 15:36:30 +02:00
commit b340591ccd
2 changed files with 6 additions and 15 deletions

View file

@ -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;
}
}