Small tweak to some HUD colors.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 85 B |
|
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 102 B After Width: | Height: | Size: 106 B |
|
Before Width: | Height: | Size: 97 B After Width: | Height: | Size: 103 B |
|
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 106 B |
|
|
@ -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-";
|
||||
|
|
|
|||
|
|
@ -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") )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||