class ExtWidget_BossHealthBar extends KFGFxWidget_BossHealthBar; var transient array BossList; var transient float NextBossDistTime,LastHP,LastShield; var transient byte NumBosses; var transient bool bVisib,bHasInit; function TickHud(float DeltaTime) { if( !KFPC.bHideBossHealthBar && BossList.Length>0 ) { if( KFPC.WorldInfo.RealTimeSeconds>LastUpdateTime && HasBossesAlive() ) { LastUpdateTime = KFPC.WorldInfo.RealTimeSeconds + UpdateTickTime; if( !bVisib ) { LastHP = -1; LastShield = -1; bVisib = true; SetVisible(true); } UpdateBossInfo(); } } else if( bHasInit ) { NumBosses = 0; bHasInit = false; BossList.Length = 0; if( bVisib ) { bVisib = false; SetVisible(false); } } } final function bool HasBossesAlive() { local int i; for( i=(BossList.Length-1); i>=0; --i ) { if( BossList[i]==None || BossList[i].bDeleteMe || BossList[i].GetTeamNum()==0 ) { BossList.Remove(i,1); --NumBosses; } else if( !BossList[i].IsAliveAndWell() ) BossList.Remove(i,1); } return (BossList.Length>0); } function SetBossPawn(KFPawn_Monster NewBossPawn) { if( !KFPC.bHideBossHealthBar && NewBossPawn!=None && NewBossPawn.IsAliveAndWell() ) { bHasInit = true; ++NumBosses; BossList.AddItem(NewBossPawn); } } final function UpdateBossInfo() { local float V; local KFPawn_Monster B; if( NextBossDistTime1 ) { foreach BossList(B) V += FClamp(float(B.Health) / float(B.HealthMax),0.f,1.f); V /= NumBosses; } if( LastShield!=V ) { LastShield = V; SetFloat("currentShieldPercecntValue",V); } } final function CheckBestBoss() { local KFPawn_Monster B,Best; local vector Pos; local float Dist,BestDist; Pos = (KFPC.ViewTarget!=None ? KFPC.ViewTarget.Location : KFPC.Location); foreach BossList(B) { Dist = VSizeSq(Pos-B.Location); if( Best==None || Dist