88f2c71e54
Fixed scoreboard avatars not working Added the ServerExt perk menu to the lobby Made the perk buttons look better (Reset, Unload, Prestige) Added a better damage popup system Added a better pet info hud system Made player info bars fade out with distance Added missing traits from most of the perks Made lobby menu support 12 players Medic Pistol from the trait can't be dropped, sold and has infinite ammo 9mm Pistol now has infinite ammo Pet sirens do not blow up grenades Unlocked all cosmetics and emotes Hide bad cosmetics that were debug Hans pet no longer forces the camera on his death Custom weapons in the trader now support the proper weapon names Updated character info system to support alot of added items
87 lines
2.6 KiB
Ucode
87 lines
2.6 KiB
Ucode
Class UIP_PerkSelectionLobby extends UIP_PerkSelection;
|
|
|
|
function Timer()
|
|
{
|
|
local int i;
|
|
|
|
CurrentManager = ExtPlayerController(GetPlayer()).ActivePerkManager;
|
|
if( CurrentManager!=None )
|
|
{
|
|
if( PrevPendingPerk!=None )
|
|
{
|
|
PendingPerk = CurrentManager.FindPerk(PrevPendingPerk);
|
|
PrevPendingPerk = None;
|
|
}
|
|
PerkList.ChangeListSize(CurrentManager.UserPerks.Length);
|
|
if( PendingPerk!=None && !PendingPerk.bPerkNetReady )
|
|
return;
|
|
|
|
// Huge code block to handle stat updating, but actually pretty well optimized.
|
|
if( PendingPerk!=OldUsedPerk )
|
|
{
|
|
OldUsedPerk = PendingPerk;
|
|
if( PendingPerk!=None )
|
|
{
|
|
OldPerkPoints = -1;
|
|
if( StatsList.ItemComponents.Length!=PendingPerk.PerkStats.Length )
|
|
{
|
|
if( StatsList.ItemComponents.Length<PendingPerk.PerkStats.Length )
|
|
{
|
|
for( i=StatsList.ItemComponents.Length; i<PendingPerk.PerkStats.Length; ++i )
|
|
{
|
|
if( i>=StatBuyers.Length )
|
|
{
|
|
StatBuyers[StatBuyers.Length] = UIR_PerkStat(StatsList.AddListComponent(class'UIR_PerkStat'));
|
|
StatBuyers[i].StatIndex = i;
|
|
StatBuyers[i].InitMenu();
|
|
}
|
|
else
|
|
{
|
|
StatsList.ItemComponents.Length = i+1;
|
|
StatsList.ItemComponents[i] = StatBuyers[i];
|
|
}
|
|
}
|
|
}
|
|
else if( StatsList.ItemComponents.Length>PendingPerk.PerkStats.Length )
|
|
{
|
|
for( i=PendingPerk.PerkStats.Length; i<StatsList.ItemComponents.Length; ++i )
|
|
StatBuyers[i].CloseMenu();
|
|
StatsList.ItemComponents.Length = PendingPerk.PerkStats.Length;
|
|
}
|
|
}
|
|
OldPerkPoints = PendingPerk.CurrentSP;
|
|
PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")");
|
|
for( i=0; i<StatsList.ItemComponents.Length; ++i ) // Just make sure perk stays the same.
|
|
{
|
|
StatBuyers[i].SetActivePerk(PendingPerk);
|
|
StatBuyers[i].CheckBuyLimit();
|
|
}
|
|
UpdateTraits();
|
|
}
|
|
else // Empty out if needed.
|
|
{
|
|
for( i=0; i<StatsList.ItemComponents.Length; ++i )
|
|
StatBuyers[i].CloseMenu();
|
|
StatsList.ItemComponents.Length = 0;
|
|
PerkLabel.SetText("<No perk selected>");
|
|
}
|
|
}
|
|
else if( PendingPerk!=None && OldPerkPoints!=PendingPerk.CurrentSP )
|
|
{
|
|
OldPerkPoints = PendingPerk.CurrentSP;
|
|
PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")");
|
|
for( i=0; i<StatsList.ItemComponents.Length; ++i ) // Just make sure perk stays the same.
|
|
StatBuyers[i].CheckBuyLimit();
|
|
|
|
// Update traits list.
|
|
UpdateTraits();
|
|
}
|
|
}
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
Components.Remove(UnloadPerkButton)
|
|
Components.Remove(PrestigePerkButton)
|
|
Components.Remove(ResetPerkButton)
|
|
} |