Small tweak to HUD score display:
* Accumulators fade out sooner * Score interpolator does not tick until accumulators start fading
This commit is contained in:
parent
2fe8e0f947
commit
339fd58507
5 changed files with 13 additions and 11 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1182 \cu(jue 20 feb 2025 13:45:37 CET)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1182 \cu(2025-02-20 13:45:37)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1184 \cu(jue 20 feb 2025 15:20:43 CET)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1184 \cu(2025-02-20 15:20:43)\c-";
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ extend Class SWWMHandler
|
|||
if ( !bar ) return;
|
||||
if ( bar.cummscoreup+e.Args[0] < bar.cummscoreup ) bar.cummscoreup = 999999999;
|
||||
else bar.cummscoreup = min(999999999,bar.cummscoreup+e.Args[0]);
|
||||
bar.cummspanup = 120+40*int(Log10(clamp(bar.cummscoreup,1,999999999)));
|
||||
bar.cummspanup = 20+35*int(Log10(clamp(bar.cummscoreup,1,999999999)));
|
||||
bar.cummflashup = 15;
|
||||
}
|
||||
else if ( e.Name ~== "swwmhudtakescore" )
|
||||
|
|
@ -209,7 +209,7 @@ extend Class SWWMHandler
|
|||
if ( !bar ) return;
|
||||
if ( bar.cummscoredn+e.Args[0] < bar.cummscoredn ) bar.cummscoredn = 999999999;
|
||||
else bar.cummscoredn = min(999999999,bar.cummscoredn+e.Args[0]);
|
||||
bar.cummspandn = 120+40*int(Log10(clamp(bar.cummscoredn,1,999999999)));
|
||||
bar.cummspandn = 20+35*int(Log10(clamp(bar.cummscoredn,1,999999999)));
|
||||
bar.cummflashdn = 15;
|
||||
}
|
||||
else if ( e.Name ~== "swwmitemused" )
|
||||
|
|
|
|||
|
|
@ -208,8 +208,8 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
// forcibly flushes our interpolators
|
||||
void Flush()
|
||||
{
|
||||
FlushTopStuff();
|
||||
FlushStatus();
|
||||
FlushWeapons();
|
||||
}
|
||||
|
||||
// separated so they can be auto-ticked by the demolitionist menu
|
||||
|
|
|
|||
|
|
@ -29,14 +29,8 @@ extend Class SWWMStatusBar
|
|||
qsort_playerscore(a,p+1,h);
|
||||
}
|
||||
|
||||
private void FlushTopStuff()
|
||||
{
|
||||
ScoreInter.Reset(SWWMCredits.Get(CPlayer));
|
||||
}
|
||||
|
||||
private void TickTopStuffInterpolators()
|
||||
{
|
||||
ScoreInter.Update(SWWMCredits.Get(CPlayer));
|
||||
// stats flashing
|
||||
if ( level.killed_monsters > oldkills )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
// Weapons and ammo
|
||||
extend Class SWWMStatusBar
|
||||
{
|
||||
private void FlushWeapons()
|
||||
{
|
||||
ScoreInter.Reset(SWWMCredits.Get(CPlayer));
|
||||
}
|
||||
|
||||
private void TickWeaponInterpolators()
|
||||
{
|
||||
// don't update while cumulative scores are racking up
|
||||
if ( ((cummspanup < 20) && (cummspandn < 20)) || (CPlayer != players[consoleplayer]) )
|
||||
ScoreInter.Update(SWWMCredits.Get(CPlayer));
|
||||
// ammo updates
|
||||
for ( int i=0; i<18; i++ )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue