Division by zero hotfix for alt hud or hud being disabled.
This commit is contained in:
parent
e3a530e48f
commit
0364d56add
3 changed files with 14 additions and 13 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1108 \cu(Mon 26 Feb 22:06:04 CET 2024)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1108 \cu(2024-02-26 22:06:04)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1109 \cu(Wed 6 Mar 20:03:50 CET 2024)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1109 \cu(2024-03-06 20:03:50)\c-";
|
||||
|
|
|
|||
|
|
@ -625,11 +625,6 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
Super.Draw(state,TicFrac);
|
||||
FrameTime = (CurFrame-PrevFrame)/1000.;
|
||||
if ( (state != HUD_StatusBar) && (state != HUD_Fullscreen) )
|
||||
{
|
||||
PrevFrame = CurFrame;
|
||||
return;
|
||||
}
|
||||
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
hsA = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.);
|
||||
hsT = max(min(floor(Screen.GetWidth()/480.),floor(Screen.GetHeight()/270.)),1.);
|
||||
|
|
@ -660,6 +655,16 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
// calculate vertical margin for hudscale0 (relative to base hudscale)
|
||||
ymargin0 = int(ymargin*(hs/hs0));
|
||||
FracTic = TicFrac;
|
||||
if ( (state != HUD_StatusBar) && (state != HUD_Fullscreen) )
|
||||
{
|
||||
if ( state == HUD_AltHud )
|
||||
{
|
||||
String str = StringTable.Localize("$SWWM_WARNALTHUD");
|
||||
Screen.DrawText(NewSmallFont,Font.CR_RED,(ss0.x-NewSmallFont.StringWidth(str))/2,ymargin0,str,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true);
|
||||
}
|
||||
PrevFrame = CurFrame;
|
||||
return;
|
||||
}
|
||||
if ( (players[consoleplayer].Camera is 'Demolitionist') && (state <= HUD_Fullscreen) )
|
||||
{
|
||||
DrawTarget();
|
||||
|
|
@ -672,11 +677,6 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
DrawPickups();
|
||||
double malph = DrawDeath();
|
||||
DrawMessages(malph);
|
||||
if ( state == HUD_AltHud )
|
||||
{
|
||||
String str = StringTable.Localize("$SWWM_WARNALTHUD");
|
||||
Screen.DrawText(NewSmallFont,Font.CR_RED,(ss0.x-NewSmallFont.StringWidth(str))/2,ymargin0,str,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true);
|
||||
}
|
||||
PrevFrame = CurFrame;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1089,7 +1089,8 @@ Class SWWMWeaponSelect : HUDMessageBase
|
|||
|
||||
private TextureID GetIcon( Weapon w )
|
||||
{
|
||||
return StatusBar.GetInventoryIcon(w,StatusBar.DI_SKIPALTICON|StatusBar.DI_SKIPREADY);
|
||||
let [ico, applyScale] = StatusBar.GetInventoryIcon(w,StatusBar.DI_SKIPALTICON|StatusBar.DI_SKIPREADY);
|
||||
return ico;
|
||||
}
|
||||
|
||||
private double CalcHeight()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue