Implement score increase/decrease accumulator in HUD.
This commit is contained in:
parent
a064184777
commit
68c01dbd63
5 changed files with 81 additions and 3 deletions
|
|
@ -171,6 +171,24 @@ extend Class SWWMHandler
|
|||
// send the post-teleport position
|
||||
DoPlayerStep(demo.pos.xy,true);
|
||||
}
|
||||
else if ( e.Name ~== "swwmhudgivescore" )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
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.cummflashup = 15;
|
||||
}
|
||||
else if ( e.Name ~== "swwmhudtakescore" )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
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.cummflashdn = 15;
|
||||
}
|
||||
}
|
||||
|
||||
override void NetworkProcess( ConsoleEvent e )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue