2017-10-20 02:00:49 +00:00
|
|
|
class ExtHUD_WaveInfo extends KFGFxHUD_WaveInfo;
|
|
|
|
|
|
|
|
function TickHud(float DeltaTime)
|
|
|
|
{
|
|
|
|
local int i;
|
|
|
|
|
2020-11-28 19:53:57 +00:00
|
|
|
if(KFGRI == none)
|
|
|
|
KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(KFGRI.bTraderIsOpen)
|
|
|
|
{
|
2017-10-20 02:00:49 +00:00
|
|
|
i = KFGRI.GetTraderTimeRemaining();
|
|
|
|
if(LastTraderTimeRemaining != i)
|
|
|
|
{
|
|
|
|
SetInt("remainingTraderTime" ,i);
|
|
|
|
LastTraderTimeRemaining = i;
|
|
|
|
}
|
|
|
|
}
|
2020-11-28 19:53:57 +00:00
|
|
|
else
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
i = KFGRI.IsFinalWave() ? INDEX_NONE : Max(KFGRI.AIRemaining,0);
|
|
|
|
if(LastZEDCount != i)
|
|
|
|
{
|
|
|
|
SetInt("remainingZEDs" ,i);
|
|
|
|
LastZEDCount = i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Max # of waves.
|
|
|
|
if(LastWaveMax != KFGRI.WaveMax)
|
|
|
|
{
|
|
|
|
LastWaveMax = KFGRI.WaveMax;
|
|
|
|
SetInt("maxWaves" ,LastWaveMax-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Current wave we're on.
|
2020-11-28 20:04:55 +00:00
|
|
|
if(LastWave!=KFGRI.WaveNum)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
LastWave = KFGRI.WaveNum;
|
2020-11-28 20:04:55 +00:00
|
|
|
if(LastWave>LastWaveMax)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
SetInt("currentWave",0); // Force text to refresh.
|
|
|
|
SetString("finalText", "END");
|
|
|
|
}
|
|
|
|
SetInt("currentWave",Min(LastWave,LastWaveMax));
|
|
|
|
}
|
2020-11-28 19:53:57 +00:00
|
|
|
}
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function UpdateWaveCount();
|
|
|
|
|
|
|
|
DefaultProperties
|
|
|
|
{
|
|
|
|
LastWave=-1
|
|
|
|
}
|