diff --git a/docimg/hudsample.png b/docimg/hudsample.png index 6923f9cdd..b62812a1f 100644 Binary files a/docimg/hudsample.png and b/docimg/hudsample.png differ diff --git a/graphics/HUD/EnemyBar2.png b/graphics/HUD/EnemyBar2.png index b4cae6221..f02a35943 100644 Binary files a/graphics/HUD/EnemyBar2.png and b/graphics/HUD/EnemyBar2.png differ diff --git a/graphics/HUD/EnemyBar3.png b/graphics/HUD/EnemyBar3.png index 2eed5758f..b4895fad5 100644 Binary files a/graphics/HUD/EnemyBar3.png and b/graphics/HUD/EnemyBar3.png differ diff --git a/graphics/HUD/FuelBar.png b/graphics/HUD/FuelBar.png index 6d00f1d53..11ca8ebf1 100644 Binary files a/graphics/HUD/FuelBar.png and b/graphics/HUD/FuelBar.png differ diff --git a/graphics/HUD/HealthBar2.png b/graphics/HUD/HealthBar2.png index b4858b970..a12363828 100644 Binary files a/graphics/HUD/HealthBar2.png and b/graphics/HUD/HealthBar2.png differ diff --git a/graphics/HUD/HealthBar3.png b/graphics/HUD/HealthBar3.png index da639b650..56d58530a 100644 Binary files a/graphics/HUD/HealthBar3.png and b/graphics/HUD/HealthBar3.png differ diff --git a/language.version b/language.version index d19f3bbd8..e544a702a 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1087 \cu(Tue 16 Jan 10:17:28 CET 2024)\c-"; -SWWM_SHORTVER="\cw1.3pre r1087 \cu(2024-01-16 10:17:28)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1088 \cu(Tue 16 Jan 10:40:28 CET 2024)\c-"; +SWWM_SHORTVER="\cw1.3pre r1088 \cu(2024-01-16 10:40:28)\c-"; diff --git a/zscript/hud/swwm_hud_status.zsc b/zscript/hud/swwm_hud_status.zsc index 3bb51f530..1c6c7375c 100644 --- a/zscript/hud/swwm_hud_status.zsc +++ b/zscript/hud/swwm_hud_status.zsc @@ -146,7 +146,7 @@ extend Class SWWMStatusBar double hw = min(ht,100); double bhw = hw; int hcolor = MCR_RED; - if ( round(ht) > 500 ) hcolor = MCR_YELLOW; + if ( round(ht) > 500 ) hcolor = MCR_GOLD; else if ( round(ht) > 200 ) hcolor = MCR_PURPLE; else if ( round(ht) > 100 ) hcolor = MCR_AQUA; if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") ) diff --git a/zscript/hud/swwm_hud_target.zsc b/zscript/hud/swwm_hud_target.zsc index d541fa67d..85536c8c4 100644 --- a/zscript/hud/swwm_hud_target.zsc +++ b/zscript/hud/swwm_hud_target.zsc @@ -235,8 +235,6 @@ extend Class SWWMStatusBar } // ignore unowned (can happen?) if ( !ct.Owner ) continue; - // ignore if max health is zero (SOMEHOW can happen) - if ( ct.maxhealth <= 0 ) continue; // ignore non-player trackers and voodoo dolls if ( !ct.Owner.player || (ct.Owner.player.mo != ct.Owner) ) continue; // ignore local player or camera @@ -261,12 +259,27 @@ extend Class SWWMStatusBar { // player health values are drawn as a single number // font color is the same as in the status box - String val = String.Format("%d",ct.lasthealth); + String val = String.Format("%d",clamp(ct.lasthealth,0,999)); int valw = MiniHUDFontOutline.StringWidth(val); - int col = (ct.lasthealth>500)?mhudfontcol[MCR_YELLOW]:(ct.lasthealth>200)?mhudfontcol[MCR_PURPLE]:(ct.lasthealth>100)?mhudfontcol[MCR_AQUA]:mhudfontcol[MCR_RED]; + int col = (ct.lasthealth>500)?mhudfontcol[MCR_GOLD]:(ct.lasthealth>200)?mhudfontcol[MCR_PURPLE]:(ct.lasthealth>100)?mhudfontcol[MCR_AQUA]:mhudfontcol[MCR_RED]; if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory("InvinciballPower") ) col = mhudfontcol[MCR_WHITE]; - Screen.DrawText(MiniHUDFontOutline,col,vpos.x-(valw/2),barpos.y-(MiniHUDFontOutline.GetHeight()+2),val,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph); + if ( ct.Owner.FindInventory("DivineSpriteEffect") ) + { + double falph = clamp((ct.intp.GetValue(fractic)-1000)/6000.,0.,1.); + String tst; + double ffalph = .1; + int trl = 9; + for ( double ffalph = .1; ffalph <= .5; ffalph += .1 ) + { + tst = "AAA"; + SWWMUtility.ObscureText(tst,(gametic-trl)/3,minihud:true); + trl--; + Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_WHITE],vpos.x-(valw/2),barpos.y-(MiniHUDFontOutline.GetHeight()+2),tst,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph*ffalph,DTA_LegacyRenderStyle,STYLE_Add); + } + Screen.DrawText(MiniHUDFontOutline,col,vpos.x-(valw/2),barpos.y-(MiniHUDFontOutline.GetHeight()+2),val,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph*(1.-falph)); + } + else Screen.DrawText(MiniHUDFontOutline,col,vpos.x-(valw/2),barpos.y-(MiniHUDFontOutline.GetHeight()+2),val,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph); } Font fnt = swwm_bigtags?mSmallFontOutlineAlt:mTinyFontOutlineAlt; int col = Font.CR_WHITE; @@ -279,39 +292,39 @@ extend Class SWWMStatusBar int ofsh = drawvalues?(MiniHUDFontOutline.GetHeight()+4):2; Screen.DrawText(fnt,col,vpos.x-fnt.StringWidth(ct.mytag)/2,barpos.y-(fnt.GetHeight()+ofsh),ct.mytag,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph); Screen.DrawTexture(EnemyBTex,false,barpos.x,barpos.y,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph); - double ht = clamp(ct.intp.GetValue(fractic),0,ct.maxhealth*100); - double hw = (ht*50.)/ct.maxhealth; + double ht = clamp(ct.intp.GetValue(fractic),0,10000); + double hw = (ht*50.)/100.; double ohw = hw; if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory("InvinciballPower") ) Screen.DrawTexture(EnemyHTex[1],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); else { Screen.DrawTexture(EnemyHTex[0],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); - if ( ht > ct.maxhealth ) + if ( ht > 100 ) { - hw = (min(ht-ct.maxhealth,ct.maxhealth)*50.)/ct.maxhealth; + hw = (min(ht-100,100)*50.)/100.; Screen.DrawTexture(EnemyHTex[3],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); } - if ( ht > ct.maxhealth*2 ) + if ( ht > 200 ) { - hw = (min(ht-ct.maxhealth*2,ct.maxhealth*3)*50.)/ct.maxhealth; + hw = (min(ht-200,300)*50.)/100.; Screen.DrawTexture(EnemyHTex[4],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); } - if ( ht > ct.maxhealth*5 ) + if ( ht > 500 ) { - hw = (min(ht-ct.maxhealth*5,ct.maxhealth*5)*50.)/ct.maxhealth; + hw = (min(ht-500,500)*50.)/100.; Screen.DrawTexture(EnemyHTex[5],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); } } if ( ct.Owner.FindInventory("DivineSpriteEffect") ) { - double falph = clamp((ht-ct.maxhealth*10)/(ct.maxhealth*60.),0.,1.); + double falph = clamp((ht-1000)/6000.,0.,1.); Screen.DrawTexture(EnemyHTex[6],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph,DTA_LegacyRenderStyle,STYLE_Add); } else { - ht = clamp(ct.intpl.GetValue(fractic),0,ct.maxhealth); - hw = min((ht*50.)/ct.maxhealth,100.); + ht = clamp(ct.intpl.GetValue(fractic),0,100); + hw = min((ht*50.)/100.,100.); Screen.DrawTexture(EnemyHTex[2],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowLeftF,ohw,DTA_WindowRightF,hw); } if ( ct.cummdamage <= 0 ) continue;