This commit is contained in:
GenZmeY 2022-09-03 13:05:39 +03:00
parent 0641ab8773
commit 9dd37033fc
12 changed files with 79 additions and 182 deletions

View File

@ -41,7 +41,7 @@ public static function InitConfig(int ConfigVersion)
} }
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -4,8 +4,8 @@ class KFScoreBoard extends KFGUI_Page
`include(Build.uci) `include(Build.uci)
`include(Logger.uci) `include(Logger.uci)
var transient float HealthXPos, ArmorXPos, RankXPos, PlayerXPos, LevelXPos, PerkXPos, DoshXPos, KillsXPos, AssistXPos, PingXPos, ScrollXPos; var transient float HealthXPos, RankXPos, PlayerXPos, LevelXPos, PerkXPos, DoshXPos, KillsXPos, AssistXPos, PingXPos, ScrollXPos;
var transient float HealthWBox, ArmorWBox, RankWBox, PlayerWBox, LevelWBox, PerkWBox, DoshWBox, KillsWBox, AssistWBox, PingWBox, ScrollWBox; var transient float HealthWBox, RankWBox, PlayerWBox, LevelWBox, PerkWBox, DoshWBox, KillsWBox, AssistWBox, PingWBox, ScrollWBox;
var transient float NextScoreboardRefresh; var transient float NextScoreboardRefresh;
var transient int NumPlayer; var transient int NumPlayer;
@ -136,6 +136,22 @@ function string WaveText()
} }
} }
function String ServerName()
{
local KFOnlineGameSettings KFGS;
local KFGameInfo KFGI;
KFGI = KFGameInfo(KFGRI.WorldInfo.Game);
if (KFGI != None && KFGI.PlayfabInter != None && KFGI.PlayfabInter.GetGameSettings() != None)
{
KFGS = KFOnlineGameSettings(KFGI.PlayfabInter.GetGameSettings());
return KFGS.OwningPlayerName;
}
return KFGRI.ServerName;
}
function DrawMenu() function DrawMenu()
{ {
local string S; local string S;
@ -224,7 +240,7 @@ function DrawMenu()
Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Settings.Style.EdgeSize, Settings.Style.ShapeServerNameBox); Owner.CurrentStyle.DrawRectBox(BoxX, YPos, BoxW, BoxH, Settings.Style.EdgeSize, Settings.Style.ShapeServerNameBox);
SetDrawColor(Canvas, Settings.Style.ServerNameTextColor); SetDrawColor(Canvas, Settings.Style.ServerNameTextColor);
S = KFGRI.ServerName; S = ServerName();
DrawTextShadowHVCenter(S, BoxX, YPos, BoxW, FontScalar); DrawTextShadowHVCenter(S, BoxX, YPos, BoxW, FontScalar);
YPos += BoxH; YPos += BoxH;
@ -305,11 +321,7 @@ function DrawMenu()
} }
HealthWBox = (BoxW < MinBoxW ? MinBoxW : BoxW) * 0.5 + BorderSize * 2; HealthWBox = (BoxW < MinBoxW ? MinBoxW : BoxW) * 0.5 + BorderSize * 2;
// Armor RankXPos = HealthXPos + HealthWBox + Settings.Style.EdgeSize;
ArmorXPos = HealthXPos + HealthWBox;
ArmorWBox = HealthWBox;
RankXPos = ArmorXPos + ArmorWBox + Settings.Style.EdgeSize;
PlayerXPos = Width * 0.30; // TODO PlayerXPos = Width * 0.30; // TODO
@ -362,7 +374,6 @@ function DrawMenu()
SetDrawColor(Canvas, ColorTmp); SetDrawColor(Canvas, ColorTmp);
DrawHealthIcon(XPos + HealthXPos, YPos, HealthWBox, BoxH); DrawHealthIcon(XPos + HealthXPos, YPos, HealthWBox, BoxH);
DrawArmorIcon(XPos + ArmorXPos, YPos, ArmorWBox, BoxH);
PlayersList.XPosition = ((Canvas.ClipX - Width) * 0.5) / InputPos[2]; PlayersList.XPosition = ((Canvas.ClipX - Width) * 0.5) / InputPos[2];
PlayersList.YPosition = (YPos + YL + BorderSize * 4) / InputPos[3]; PlayersList.YPosition = (YPos + YL + BorderSize * 4) / InputPos[3];
@ -391,19 +402,6 @@ function DrawHealthIcon(float X, float Y, float W, float H)
Owner.CurrentStyle.DrawRectBox(XPos, YPos, Part, Part, 4, 100); Owner.CurrentStyle.DrawRectBox(XPos, YPos, Part, Part, 4, 100);
} }
function DrawArmorIcon(float X, float Y, float W, float H)
{
local float XPos, YPos, Size;
local int Edge;
Edge = 6;
Size = H * 0.65;
XPos = X + (W * 0.5 - Size * 0.5);
YPos = Y + (H * 0.5 - Size * 0.5);
Owner.CurrentStyle.DrawRectBox(XPos, YPos, Size, Size, Edge, 252);
}
function DrawTextShadowHVCenter(string Str, float XPos, float YPos, float BoxWidth, float FontScalar) function DrawTextShadowHVCenter(string Str, float XPos, float YPos, float BoxWidth, float FontScalar)
{ {
local float TextWidth; local float TextWidth;
@ -440,8 +438,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
local float FontScalar, TextYOffset, XL, YL, PerkIconPosX, PerkIconPosY, PerkIconSize, PrestigeIconScale; local float FontScalar, TextYOffset, XL, YL, PerkIconPosX, PerkIconPosY, PerkIconSize, PrestigeIconScale;
local float XPos, BoxWidth, RealPlayerWBox; local float XPos, BoxWidth, RealPlayerWBox;
local KFPlayerReplicationInfo KFPRI; local KFPlayerReplicationInfo KFPRI;
local KFPlayerController KFPC;
local KFPawn_Human KFPH;
local byte Level, PrestigeLevel; local byte Level, PrestigeLevel;
local bool bIsZED; local bool bIsZED;
local int Ping; local int Ping;
@ -451,12 +447,10 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
local int PlayerInfoIndex, PlayerRankIndex; local int PlayerInfoIndex, PlayerRankIndex;
local float BorderSize; local float BorderSize;
local int Shape, ShapeHealth, ShapeArmor; local int Shape, ShapeHealth;
local int Health, MaxHealth; local string TextHealth, TextState;
local int Armor, MaxArmor;
local string TextHealth, TextArmor, TextState;
local ColorRGBA HealthBoxColor, ArmorBoxColor, HealthTextColor, ArmorTextColor; local ColorRGBA HealthBoxColor, HealthTextColor;
BorderSize = Owner.HUDOwner.ScaledBorderSize; BorderSize = Owner.HUDOwner.ScaledBorderSize;
@ -510,25 +504,20 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
if (KFPRIArray.Length > 1 && Index == 0) if (KFPRIArray.Length > 1 && Index == 0)
{ {
ShapeHealth = Settings.Style.ShapeStateHealthBoxTopPlayer; ShapeHealth = Settings.Style.ShapeStateHealthBoxTopPlayer;
ShapeArmor = Settings.Style.ShapeStateArmorBoxTopPlayer;
} }
else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1) else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1)
{ {
ShapeHealth = Settings.Style.ShapeStateHealthBoxBottomPlayer; ShapeHealth = Settings.Style.ShapeStateHealthBoxBottomPlayer;
ShapeArmor = Settings.Style.ShapeStateArmorBoxBottomPlayer;
} }
else else
{ {
ShapeHealth = Settings.Style.ShapeStateHealthBoxMidPlayer; ShapeHealth = Settings.Style.ShapeStateHealthBoxMidPlayer;
ShapeArmor = Settings.Style.ShapeStateArmorBoxMidPlayer;
} }
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun) if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
{ {
HealthBoxColor = Settings.Style.StateBoxColorLobby; HealthBoxColor = Settings.Style.StateBoxColorLobby;
ArmorBoxColor = Settings.Style.StateBoxColorLobby;
HealthTextColor = Settings.Style.StateTextColorLobby; HealthTextColor = Settings.Style.StateTextColorLobby;
ArmorTextColor = Settings.Style.StateTextColorLobby;
TextState = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;; TextState = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;;
} }
else if (!KFGRI.bMatchHasBegun) else if (!KFGRI.bMatchHasBegun)
@ -536,26 +525,20 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
if (KFPRI.bReadyToPlay) if (KFPRI.bReadyToPlay)
{ {
HealthBoxColor = Settings.Style.StateBoxColorReady; HealthBoxColor = Settings.Style.StateBoxColorReady;
ArmorBoxColor = Settings.Style.StateBoxColorReady;
HealthTextColor = Settings.Style.StateBoxColorReady; HealthTextColor = Settings.Style.StateBoxColorReady;
ArmorTextColor = Settings.Style.StateBoxColorReady;
TextState = Ready; TextState = Ready;
} }
else else
{ {
HealthBoxColor = Settings.Style.StateBoxColorNotReady; HealthBoxColor = Settings.Style.StateBoxColorNotReady;
ArmorBoxColor = Settings.Style.StateBoxColorNotReady;
HealthTextColor = Settings.Style.StateBoxColorNotReady; HealthTextColor = Settings.Style.StateBoxColorNotReady;
ArmorTextColor = Settings.Style.StateBoxColorNotReady;
TextState = NotReady; TextState = NotReady;
} }
} }
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None) else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
{ {
HealthBoxColor = Settings.Style.StateTextColorNone; HealthBoxColor = Settings.Style.StateTextColorNone;
ArmorBoxColor = Settings.Style.StateTextColorNone;
HealthTextColor = Settings.Style.StateTextColorNone; HealthTextColor = Settings.Style.StateTextColorNone;
ArmorTextColor = Settings.Style.StateTextColorNone;
TextState = Unknown; TextState = Unknown;
} }
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0) else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
@ -563,17 +546,13 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
if (KFPRI.bOnlySpectator) if (KFPRI.bOnlySpectator)
{ {
HealthBoxColor = Settings.Style.StateTextColorSpectator; HealthBoxColor = Settings.Style.StateTextColorSpectator;
ArmorBoxColor = Settings.Style.StateTextColorSpectator;
HealthTextColor = Settings.Style.StateTextColorSpectator; HealthTextColor = Settings.Style.StateTextColorSpectator;
ArmorTextColor = Settings.Style.StateTextColorSpectator;
TextState = class'KFCommon_LocalizedStrings'.default.SpectatorString; TextState = class'KFCommon_LocalizedStrings'.default.SpectatorString;
} }
else else
{ {
HealthBoxColor = Settings.Style.StateTextColorDead; HealthBoxColor = Settings.Style.StateTextColorDead;
ArmorBoxColor = Settings.Style.StateTextColorDead;
HealthTextColor = Settings.Style.StateTextColorDead; HealthTextColor = Settings.Style.StateTextColorDead;
ArmorTextColor = Settings.Style.StateTextColorDead;
TextState = Dead; TextState = Dead;
} }
} }
@ -595,36 +574,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
HealthTextColor = Settings.Style.StateTextColorHealthLow; HealthTextColor = Settings.Style.StateTextColorHealthLow;
} }
TextHealth = String(KFPRI.PlayerHealth); TextHealth = String(KFPRI.PlayerHealth);
KFPC = KFPlayerController(KFPRI.Owner);
if (KFPC != None)
{
KFPH = KFPawn_Human(KFPC.Pawn);
if (KFPH != None)
{
TextArmor = String(KFPH.Armor);
if (ByteToFloat(KFPH.Armor / KFPH.MaxArmor) >= float(Settings.Armor.High) / 100.0)
{
ArmorBoxColor = Settings.Style.StateBoxColorArmorHigh;
ArmorTextColor = Settings.Style.StateTextColorArmorHigh;
}
else if (ByteToFloat(KFPH.Armor / KFPH.MaxArmor) >= float(Settings.Armor.Low) / 100.0)
{
ArmorBoxColor = Settings.Style.StateBoxColorArmorMid;
ArmorTextColor = Settings.Style.StateTextColorArmorMid;
}
else if (KFPH.Armor > 0)
{
ArmorBoxColor = Settings.Style.StateBoxColorArmorLow;
ArmorTextColor = Settings.Style.StateTextColorArmorLow;
}
else
{
ArmorBoxColor = Settings.Style.StateBoxColorArmorNone;
ArmorTextColor = Settings.Style.StateTextColorArmorNone;
}
}
}
} }
// Health box // Health box
@ -636,24 +585,15 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
Settings.Style.EdgeSize, Settings.Style.EdgeSize,
ShapeHealth); ShapeHealth);
// Armor box
SetDrawColor(C, ArmorBoxColor);
Owner.CurrentStyle.DrawRectBox(XPos + ArmorWBox,
YOffset,
ArmorWBox,
Height,
Settings.Style.EdgeSize,
ShapeArmor);
if (TextState != "") if (TextState != "")
{ {
SetDrawColor(C, HealthTextColor); SetDrawColor(C, HealthTextColor);
if (CurrentRank.ApplyColorToFields.Health) if (CurrentRank.ApplyColorToFields.Health)
SetDrawColor(C, CurrentRank.TextColor); SetDrawColor(C, CurrentRank.TextColor);
DrawTextShadowHVCenter(TextState, HealthXPos, TextYOffset, HealthWBox + ArmorWBox, FontScalar); DrawTextShadowHVCenter(TextState, HealthXPos, TextYOffset, HealthWBox, FontScalar);
XPos += (HealthWBox + ArmorWBox); XPos += HealthWBox;
} }
else else
{ {
@ -663,13 +603,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
SetDrawColor(C, HealthTextColor); SetDrawColor(C, HealthTextColor);
DrawTextShadowHVCenter(TextHealth, HealthXPos, TextYOffset, HealthWBox, FontScalar); DrawTextShadowHVCenter(TextHealth, HealthXPos, TextYOffset, HealthWBox, FontScalar);
XPos += HealthWBox; XPos += HealthWBox;
if (CurrentRank.ApplyColorToFields.Armor)
SetDrawColor(C, CurrentRank.TextColor);
else
SetDrawColor(C, ArmorTextColor);
DrawTextShadowHVCenter(TextArmor, ArmorXPos, TextYOffset, HealthWBox, FontScalar);
XPos += ArmorWBox;
} }
// PlayerBox // PlayerBox
@ -685,7 +618,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
else else
Shape = Settings.Style.ShapePlayerBoxMidPlayer; Shape = Settings.Style.ShapePlayerBoxMidPlayer;
BoxWidth = DoshXPos - (HealthWBox + ArmorWBox) - BorderSize * 2; BoxWidth = DoshXPos - HealthWBox - BorderSize * 2;
Owner.CurrentStyle.DrawRectBox(XPos, YOffset, BoxWidth, Height, Settings.Style.EdgeSize, Shape); Owner.CurrentStyle.DrawRectBox(XPos, YOffset, BoxWidth, Height, Settings.Style.EdgeSize, Shape);
XPos += BoxWidth; XPos += BoxWidth;

View File

@ -26,7 +26,7 @@ public static function InitConfig(int ConfigVersion)
} }
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -52,7 +52,7 @@ public static function WriteSettings(YASSettingsArmor Settings)
default.High = Settings.High; default.High = Settings.High;
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -52,7 +52,7 @@ public static function WriteSettings(YASSettingsHealth Settings)
default.High = Settings.High; default.High = Settings.High;
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -70,7 +70,7 @@ public static function WriteSettings(YASSettingsLevel Settings)
default.HellOnEarth_High = Settings.High[3]; default.HellOnEarth_High = Settings.High[3];
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -52,7 +52,7 @@ public static function WriteSettings(YASSettingsPing Settings)
default.High = Settings.High; default.High = Settings.High;
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -26,7 +26,7 @@ public static function InitConfig(int ConfigVersion)
} }
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -56,7 +56,7 @@ public static function WriteSettings(YASSettingsAdmin Settings)
default.ApplyColorToFields = Settings.ApplyColorToFields; default.ApplyColorToFields = Settings.ApplyColorToFields;
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -56,7 +56,7 @@ public static function WriteSettings(YASSettingsPlayer Settings)
default.ApplyColorToFields = Settings.ApplyColorToFields; default.ApplyColorToFields = Settings.ApplyColorToFields;
} }
DefaultProperties defaultproperties
{ {
} }

View File

@ -7,7 +7,7 @@ struct ColorRGBA
{ {
var byte R, G, B, A; var byte R, G, B, A;
StructDefaultProperties Structdefaultproperties
{ {
R = 250 R = 250
G = 250 G = 250
@ -29,7 +29,7 @@ struct Fields
var bool Armor; var bool Armor;
var bool Ping; var bool Ping;
StructDefaultProperties Structdefaultproperties
{ {
Rank = true; Rank = true;
Player = true; Player = true;
@ -58,7 +58,7 @@ struct RankRelation
var string ObjectID; var string ObjectID;
var int RankID; var int RankID;
StructDefaultProperties Structdefaultproperties
{ {
RankID = -999 RankID = -999
} }
@ -69,7 +69,7 @@ struct UIDRankRelation
var UniqueNetId UID; var UniqueNetId UID;
var int RankID; var int RankID;
StructDefaultProperties Structdefaultproperties
{ {
RankID = -999 RankID = -999
} }
@ -81,7 +81,7 @@ struct YASSettingsAdmin
var ColorRGBA TextColor; var ColorRGBA TextColor;
var Fields ApplyColorToFields; var Fields ApplyColorToFields;
StructDefaultProperties Structdefaultproperties
{ {
Rank = "Admin" Rank = "Admin"
TextColor = (R=250, G=0, B=0, A=255) TextColor = (R=250, G=0, B=0, A=255)
@ -95,7 +95,7 @@ struct YASSettingsPlayer
var ColorRGBA TextColor; var ColorRGBA TextColor;
var Fields ApplyColorToFields; var Fields ApplyColorToFields;
StructDefaultProperties Structdefaultproperties
{ {
Rank = "Player" Rank = "Player"
TextColor = (R=250, G=250, B=250, A=255) TextColor = (R=250, G=250, B=250, A=255)
@ -108,7 +108,7 @@ struct YASSettingsHealth
var int Low; var int Low;
var int High; var int High;
StructDefaultProperties Structdefaultproperties
{ {
Low = 40 Low = 40
High = 80 High = 80
@ -120,7 +120,7 @@ struct YASSettingsArmor
var int Low; var int Low;
var int High; var int High;
StructDefaultProperties Structdefaultproperties
{ {
Low = 40 Low = 40
High = 80 High = 80
@ -132,7 +132,7 @@ struct YASSettingsPing
var int Low; var int Low;
var int High; var int High;
StructDefaultProperties Structdefaultproperties
{ {
Low = 60 Low = 60
High = 120 High = 120
@ -144,7 +144,7 @@ struct YASSettingsLevel
var int Low [4]; var int Low [4];
var int High[4]; var int High[4];
StructDefaultProperties Structdefaultproperties
{ {
Low [0] = 0 Low [0] = 0
High[0] = 0 High[0] = 0
@ -295,7 +295,7 @@ struct YASStyle
var bool AssistsTextSmoothColorChange; var bool AssistsTextSmoothColorChange;
var bool PingTextSmoothColorChange; var bool PingTextSmoothColorChange;
StructDefaultProperties Structdefaultproperties
{ {
EdgeSize = 8 EdgeSize = 8

View File

@ -11,13 +11,7 @@ var config int ConfigVersion;
var private OnlineSubsystem Steamworks; var private OnlineSubsystem Steamworks;
struct SClient var private array<YASRepInfo> RepInfos;
{
var YASRepInfo RepInfo;
var KFPlayerController KFPC;
};
var private array<SClient> RepClients;
var private array<UIDRankRelation> UIDRankRelationsPlayers; var private array<UIDRankRelation> UIDRankRelationsPlayers;
var private array<UIDRankRelation> UIDRankRelationsSteamGroups; var private array<UIDRankRelation> UIDRankRelationsSteamGroups;
var private array<UIDRankRelation> UIDRankRelationsActive; var private array<UIDRankRelation> UIDRankRelationsActive;
@ -49,7 +43,8 @@ function NotifyLogin(Controller C)
{ {
`callstack(); `callstack();
AddPlayer(C); CreateRepInfo(C);
Super.NotifyLogin(C); Super.NotifyLogin(C);
} }
@ -57,7 +52,8 @@ function NotifyLogout(Controller C)
{ {
`callstack(); `callstack();
RemovePlayer(C); DestroyRepInfo(C);
Super.NotifyLogout(C); Super.NotifyLogout(C);
} }
@ -151,75 +147,43 @@ private function LoadRelations()
} }
} }
private function AddPlayer(Controller C) private function CreateRepInfo(Controller C)
{ {
local KFPlayerController KFPC; local YASRepInfo RepInfo;
local UIDRankRelation Relation;
local SClient RepClient, RepClientNew;
`callstack(); `callstack();
KFPC = KFPlayerController(C); if (C == None) return;
if (KFPC == None)
return;
RepClientNew.KFPC = KFPC; RepInfo = Spawn(class'YASRepInfo', C);
RepClientNew.RepInfo = Spawn(class'YASRepInfo', KFPC);
RepClientNew.RepInfo.Mut = Self; RepInfo.Mut = Self;
RepClientNew.RepInfo.CustomRanks = class'CustomRanks'.default.Rank; RepInfo.Settings = Settings;
RepClientNew.RepInfo.SteamGroupRelations = UIDRankRelationsSteamGroups;
RepClientNew.RepInfo.Settings = Settings;
RepClientNew.RepInfo.RankRelation.UID = KFPC.PlayerReplicationInfo.UniqueId;
RepClientNew.RepInfo.RankRelation.RankID = UIDRankRelationsPlayers.Find('UID', RepClientNew.RepInfo.RankRelation.UID);
RepClients.AddItem(RepClientNew); RepInfos.AddItem(RepInfo);
foreach UIDRankRelationsActive(Relation)
RepClientNew.RepInfo.AddRankRelation(Relation);
RepClientNew.RepInfo.StartFirstTimeReplication();
if (RepClientNew.RepInfo.RankRelation.RankID != INDEX_NONE)
{
UIDRankRelationsActive.AddItem(RepClientNew.RepInfo.RankRelation);
foreach RepClients(RepClient)
RepClient.RepInfo.AddRankRelation(RepClientNew.RepInfo.RankRelation);
}
} }
private function RemovePlayer(Controller C) private function DestroyRepInfo(Controller C)
{ {
local KFPlayerController KFPC; local YASRepInfo RepInfo;
local int Index, i;
local UniqueNetId UID;
`callstack(); `callstack();
KFPC = KFPlayerController(C); if (C == None) return;
if (KFPC == None)
return;
UID = KFPC.PlayerReplicationInfo.UniqueId; foreach RepInfos(RepInfo)
Index = UIDRankRelationsActive.Find('UID', UID); {
if (Index != INDEX_NONE) if (RepInfo.Owner == C)
for (i = 0; i < UIDRankRelationsActive.Length; ++i) {
if (Index != i) RepInfos.RemoveItem(RepInfo);
RepClients[i].RepInfo.RemoveRankRelation(UIDRankRelationsActive[Index]); RepInfo.Destroy();
}
Index = RepClients.Find('KFPC', KFPC); }
if (Index == INDEX_NONE)
return;
if (RepClients[Index].RepInfo != None)
RepClients[Index].RepInfo.Destroy();
RepClients.Remove(Index, 1);
} }
public function UpdatePlayerRank(UIDRankRelation Rel) public function UpdatePlayerRank(UIDRankRelation Rel)
{ {
local SClient RepClient; local YASRepInfo RepInfo;
local int Index; local int Index;
`callstack(); `callstack();
@ -230,21 +194,21 @@ public function UpdatePlayerRank(UIDRankRelation Rel)
else else
UIDRankRelationsActive.AddItem(Rel); UIDRankRelationsActive.AddItem(Rel);
foreach RepClients(RepClient) foreach RepInfos(RepInfo)
RepClient.RepInfo.UpdateRankRelation(Rel); RepInfo.UpdateRankRelation(Rel);
} }
public function AddPlayerRank(UIDRankRelation Rel) public function AddPlayerRank(UIDRankRelation Rel)
{ {
local SClient RepClient; local YASRepInfo RepInfo;
`callstack(); `callstack();
foreach RepClients(RepClient) foreach RepInfos(RepInfo)
RepClient.RepInfo.AddRankRelation(Rel); RepInfo.AddRankRelation(Rel);
} }
DefaultProperties defaultproperties
{ {
} }