On-screen text for Sheen fire speed changes.

This commit is contained in:
Mari the Deer 2022-09-12 23:14:07 +02:00
commit 49f90f6c18
3 changed files with 18 additions and 2 deletions

View file

@ -11,6 +11,8 @@ Class HeavyMahSheenGun : SWWMWeapon
int tcol; // for random
bool initialized;
ui int lastfirespeed;
transient ui SmoothDynamicValueInterpolator HeatInter;
transient SpreadSlugTracer st;
@ -19,6 +21,17 @@ Class HeavyMahSheenGun : SWWMWeapon
Super.HudTick();
if ( !HeatInter ) HeatInter = SmoothDynamicValueInterpolator.Create(barrelheat,.5,1.,25.);
HeatInter.Update(barrelheat);
if ( lastfirespeed && (lastfirespeed != firespeed+1) && (Owner.player == players[consoleplayer]) )
{
let bar = SWWMStatusBar(statusbar);
if ( bar )
{
bar.ntagstr = StringTable.Localize("$SWWM_SHEENSPEED"..(firespeed+1));
bar.ntagtic = level.totaltime;
bar.ntagcol = nametagcolor;
}
}
lastfirespeed = firespeed+1;
}
action void A_DropCasing()