Add option to always show map stats in HUD.
Fix broken propagation of cvars in combat trackers if some are dormant.
This commit is contained in:
parent
3eef4ffc32
commit
4cff29ab73
7 changed files with 49 additions and 25 deletions
|
|
@ -900,6 +900,19 @@ Class SWWMCombatTracker : Thinker
|
|||
|
||||
override void Tick()
|
||||
{
|
||||
// only the first tracker accesses the CVars, saves on perf
|
||||
if ( !prev )
|
||||
{
|
||||
if ( !damagebars ) damagebars = CVar.GetCVar('swwm_damagetarget',players[consoleplayer]);
|
||||
if ( !maxdist ) maxdist = CVar.GetCVar('swwm_maxtargetdist',players[consoleplayer]);
|
||||
dbar = damagebars.GetInt();
|
||||
mxdist = maxdist.GetInt();
|
||||
}
|
||||
if ( next )
|
||||
{
|
||||
next.dbar = dbar;
|
||||
next.mxdist = mxdist;
|
||||
}
|
||||
// is target gone or dead?
|
||||
if ( !mytarget || (mytarget.Health <= 0) )
|
||||
{
|
||||
|
|
@ -972,19 +985,6 @@ Class SWWMCombatTracker : Thinker
|
|||
lasthealth = mytarget.Health;
|
||||
intp.Update(lasthealth);
|
||||
// special update conditions
|
||||
// only the first tracker accesses the CVars, saves on perf
|
||||
if ( !prev )
|
||||
{
|
||||
if ( !damagebars ) damagebars = CVar.GetCVar('swwm_damagetarget',players[consoleplayer]);
|
||||
if ( !maxdist ) maxdist = CVar.GetCVar('swwm_maxtargetdist',players[consoleplayer]);
|
||||
dbar = damagebars.GetInt();
|
||||
mxdist = maxdist.GetInt();
|
||||
}
|
||||
if ( next )
|
||||
{
|
||||
next.dbar = dbar;
|
||||
next.mxdist = mxdist;
|
||||
}
|
||||
if ( dbar )
|
||||
{
|
||||
if ( (dbar == 2) && (lasthealth >= maxhealth) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue