fixes
This commit is contained in:
parent
77300e10b2
commit
0f488d26c6
@ -309,9 +309,9 @@ function DrawTextShadowHRightVCenter(string Str, float XPos, float YPos, float B
|
|||||||
Owner.CurrentStyle.DrawTextShadow(Str, XPos + BoxWidth - TextWidth, YPos, 1, FontScalar);
|
Owner.CurrentStyle.DrawTextShadow(Str, XPos + BoxWidth - TextWidth, YPos, 1, FontScalar);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetDrawColor(Canvas C, ColorRGBA Color)
|
function SetDrawColor(Canvas C, ColorRGBA RGBA)
|
||||||
{
|
{
|
||||||
C.SetDrawColor(Color.R, Color.G, Color.B, Color.A);
|
C.SetDrawColor(RGBA.R, RGBA.G, RGBA.B, RGBA.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, float Width, bool bFocus )
|
function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, float Width, bool bFocus )
|
||||||
@ -347,9 +347,9 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
|
|||||||
{
|
{
|
||||||
if (!HasRank || (HasRank && !CurrentRank.OverrideAdminRank))
|
if (!HasRank || (HasRank && !CurrentRank.OverrideAdminRank))
|
||||||
{
|
{
|
||||||
CurrentRank.Rank = SystemAdminRank;
|
CurrentRank.Rank = Settings.SystemAdminRank;
|
||||||
CurrentRank.TextColor = SystemAdminColor;
|
CurrentRank.TextColor = Settings.SystemAdminColor;
|
||||||
CurrentRank.ApplyColorToFields = SystemAdminApplyColorToFields;
|
CurrentRank.ApplyColorToFields = Settings.SystemAdminApplyColorToFields;
|
||||||
HasRank = true;
|
HasRank = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,9 +357,9 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
|
|||||||
{
|
{
|
||||||
if (!HasRank)
|
if (!HasRank)
|
||||||
{
|
{
|
||||||
CurrentRank.Rank = SystemPlayerRank;
|
CurrentRank.Rank = Settings.SystemPlayerRank;
|
||||||
CurrentRank.TextColor = SystemPlayerColor;
|
CurrentRank.TextColor = Settings.SystemPlayerColor;
|
||||||
CurrentRank.ApplyColorToFields = SystemPlayerApplyColorToFields;
|
CurrentRank.ApplyColorToFields = Settings.SystemPlayerApplyColorToFields;
|
||||||
HasRank = true;
|
HasRank = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
class ScoreboardExtMut extends KFMutator
|
class ScoreboardExtMut extends KFMutator
|
||||||
dependson(CustomRanks, PlayerRankRelations)
|
dependson(Types)
|
||||||
config(ScoreboardExt);
|
config(ScoreboardExt);
|
||||||
|
|
||||||
const SteamIDLen = 17;
|
const SteamIDLen = 17;
|
||||||
@ -157,12 +157,14 @@ function AddPlayer(Controller C)
|
|||||||
|
|
||||||
RepClient.RepInfo.PlayerRankRelations = UIDRelations;
|
RepClient.RepInfo.PlayerRankRelations = UIDRelations;
|
||||||
RepClient.RepInfo.CustomRanks = class'CustomRanks'.default.Rank;
|
RepClient.RepInfo.CustomRanks = class'CustomRanks'.default.Rank;
|
||||||
|
/*
|
||||||
RepClient.RepInfo.SystemAdminRank = class'SystemAdminRank'.default.Rank;
|
RepClient.RepInfo.SystemAdminRank = class'SystemAdminRank'.default.Rank;
|
||||||
RepClient.RepInfo.SystemAdminColor = class'SystemAdminRank'.default.TextColor;
|
RepClient.RepInfo.SystemAdminColor = class'SystemAdminRank'.default.TextColor;
|
||||||
RepClient.RepInfo.SystemAdminApplyColorToFields = class'SystemAdminRank'.default.ApplyColorToFields;
|
RepClient.RepInfo.SystemAdminApplyColorToFields = class'SystemAdminRank'.default.ApplyColorToFields;
|
||||||
RepClient.RepInfo.SystemPlayerRank = class'SystemPlayerRank'.default.Rank;
|
RepClient.RepInfo.SystemPlayerRank = class'SystemPlayerRank'.default.Rank;
|
||||||
RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerRank'.default.TextColor;
|
RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerRank'.default.TextColor;
|
||||||
RepClient.RepInfo.SystemPlayerApplyColorToFields = class'SystemPlayerRank'.default.ApplyColorToFields;
|
RepClient.RepInfo.SystemPlayerApplyColorToFields = class'SystemPlayerRank'.default.ApplyColorToFields;
|
||||||
|
*/
|
||||||
|
|
||||||
RepClient.RepInfo.ClientStartReplication();
|
RepClient.RepInfo.ClientStartReplication();
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,8 @@ class ScoreboardExtRepInfo extends ReplicationInfo;
|
|||||||
var public array<UIDRankRelation> PlayerRankRelations;
|
var public array<UIDRankRelation> PlayerRankRelations;
|
||||||
var public array<RankInfo> CustomRanks;
|
var public array<RankInfo> CustomRanks;
|
||||||
|
|
||||||
var public string SystemAdminRank;
|
var public SCESettings Settings;
|
||||||
var public ColorRGBA SystemAdminColor;
|
var public SCEStyle Style;
|
||||||
var public Fields SystemAdminApplyColorToFields;
|
|
||||||
|
|
||||||
var public string SystemPlayerRank;
|
|
||||||
var public ColorRGBA SystemPlayerColor;
|
|
||||||
var public Fields SystemPlayerApplyColorToFields;
|
|
||||||
|
|
||||||
var private bool InitFinished, RanksFinished, InfosFinished;
|
var private bool InitFinished, RanksFinished, InfosFinished;
|
||||||
var private int InfosReplicateProgress, RanksReplicateProgress;
|
var private int InfosReplicateProgress, RanksReplicateProgress;
|
||||||
@ -20,14 +15,7 @@ public function ClientStartReplication()
|
|||||||
{
|
{
|
||||||
GetScoreboard();
|
GetScoreboard();
|
||||||
|
|
||||||
ClientInitSystem(
|
ClientInit(Settings, Style);
|
||||||
SystemAdminRank,
|
|
||||||
SystemAdminColor,
|
|
||||||
SystemAdminApplyColorToFields,
|
|
||||||
SystemPlayerRank,
|
|
||||||
SystemPlayerColor,
|
|
||||||
SystemPlayerApplyColorToFields);
|
|
||||||
|
|
||||||
SetTimer(0.01f, true, nameof(ClientReplicateRanks));
|
SetTimer(0.01f, true, nameof(ClientReplicateRanks));
|
||||||
SetTimer(0.01f, true, nameof(ClientReplicateInfos));
|
SetTimer(0.01f, true, nameof(ClientReplicateInfos));
|
||||||
}
|
}
|
||||||
@ -94,20 +82,10 @@ private reliable client function InfosReplicationFinished()
|
|||||||
ClientInfosApply();
|
ClientInfosApply();
|
||||||
}
|
}
|
||||||
|
|
||||||
private reliable client function ClientInitSystem(
|
private reliable client function ClientInit(SCESettings _Settings, SCEStyle _Style)
|
||||||
string _SystemAdminRank,
|
|
||||||
ColorRGBA _SystemAdminColor,
|
|
||||||
Fields _SystemAdminApplyColorToFields,
|
|
||||||
string _SystemPlayerRank,
|
|
||||||
ColorRGBA _SystemPlayerColor,
|
|
||||||
Fields _SystemPlayerApplyColorToFields)
|
|
||||||
{
|
{
|
||||||
SystemAdminRank = _SystemAdminRank;
|
Settings = _Settings;
|
||||||
SystemAdminColor = _SystemAdminColor;
|
Style = _Style;
|
||||||
SystemAdminApplyColorToFields = _SystemAdminApplyColorToFields;
|
|
||||||
SystemPlayerRank = _SystemPlayerRank;
|
|
||||||
SystemPlayerColor = _SystemPlayerColor;
|
|
||||||
SystemPlayerApplyColorToFields = _SystemPlayerApplyColorToFields;
|
|
||||||
|
|
||||||
ClientSystemApply();
|
ClientSystemApply();
|
||||||
}
|
}
|
||||||
@ -120,12 +98,8 @@ private reliable client function ClientSystemApply()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SC.SystemAdminRank = SystemAdminRank;
|
SC.Settings = Settings;
|
||||||
SC.SystemAdminColor = SystemAdminColor;
|
SC.Style = Style;
|
||||||
SC.SystemAdminApplyColorToFields = SystemAdminApplyColorToFields;
|
|
||||||
SC.SystemPlayerRank = SystemPlayerRank;
|
|
||||||
SC.SystemPlayerColor = SystemPlayerColor;
|
|
||||||
SC.SystemPlayerApplyColorToFields = SystemPlayerApplyColorToFields;
|
|
||||||
|
|
||||||
InitFinished = true;
|
InitFinished = true;
|
||||||
Finished();
|
Finished();
|
||||||
|
@ -1,38 +1,102 @@
|
|||||||
class Types extends Object;
|
class Types extends Object;
|
||||||
|
|
||||||
|
struct ColorRGBA
|
||||||
|
{
|
||||||
|
var byte R, G, B, A;
|
||||||
|
|
||||||
|
StructDefaultProperties
|
||||||
|
{
|
||||||
|
R=250
|
||||||
|
G=250
|
||||||
|
B=250
|
||||||
|
A=255
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Fields
|
||||||
|
{
|
||||||
|
var bool Rank;
|
||||||
|
var bool Player;
|
||||||
|
var bool Perk;
|
||||||
|
var bool Dosh;
|
||||||
|
var bool Kills;
|
||||||
|
var bool Assists;
|
||||||
|
var bool Health;
|
||||||
|
var bool Ping;
|
||||||
|
|
||||||
|
StructDefaultProperties
|
||||||
|
{
|
||||||
|
Rank = true;
|
||||||
|
Player = true;
|
||||||
|
Perk = false;
|
||||||
|
Dosh = false;
|
||||||
|
Kills = false;
|
||||||
|
Assists = false;
|
||||||
|
Health = false;
|
||||||
|
Ping = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct RankInfo
|
||||||
|
{
|
||||||
|
var int ID;
|
||||||
|
var string Rank;
|
||||||
|
var ColorRGBA TextColor;
|
||||||
|
var bool OverrideAdminRank;
|
||||||
|
var Fields ApplyColorToFields;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SteamGroupRankRelation
|
||||||
|
{
|
||||||
|
var string SteamGroupID;
|
||||||
|
var int RankID;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PlayerRankRelation
|
||||||
|
{
|
||||||
|
var string PlayerID;
|
||||||
|
var int RankID;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct UIDRankRelation
|
||||||
|
{
|
||||||
|
var UniqueNetId UID;
|
||||||
|
var int RankID;
|
||||||
|
};
|
||||||
|
|
||||||
struct SCESettings
|
struct SCESettings
|
||||||
{
|
{
|
||||||
string SystemAdminRank;
|
var string SystemAdminRank;
|
||||||
ColorRGBA SystemAdminColor;
|
var ColorRGBA SystemAdminColor;
|
||||||
Fields SystemAdminApplyColorToFields;
|
var Fields SystemAdminApplyColorToFields;
|
||||||
|
|
||||||
string SystemPlayerRank;
|
var string SystemPlayerRank;
|
||||||
ColorRGBA SystemPlayerColor;
|
var ColorRGBA SystemPlayerColor;
|
||||||
Fields SystemPlayerApplyColorToFields;
|
var Fields SystemPlayerApplyColorToFields;
|
||||||
|
|
||||||
int HP_Low;
|
var int HP_Low;
|
||||||
int HP_High;
|
var int HP_High;
|
||||||
|
|
||||||
int Ping_Low;
|
var int Ping_Low;
|
||||||
int Ping_High;
|
var int Ping_High;
|
||||||
|
|
||||||
int Normal_Low;
|
var int Normal_Low;
|
||||||
int Normal_High;
|
var int Normal_High;
|
||||||
int Hard_Low;
|
var int Hard_Low;
|
||||||
int Hard_High;
|
var int Hard_High;
|
||||||
int Suicide_Low;
|
var int Suicide_Low;
|
||||||
int Suicide_High;
|
var int Suicide_High;
|
||||||
int HellOnEarth_Low;
|
var int HellOnEarth_Low;
|
||||||
int HellOnEarth_High;
|
var int HellOnEarth_High;
|
||||||
|
|
||||||
StructDefaultProperties
|
StructDefaultProperties
|
||||||
{
|
{
|
||||||
SystemAdminRank="Admin"
|
SystemAdminRank="Admin"
|
||||||
SystemAdminColor=(R=250,G=0,B=0)
|
SystemAdminColor=(R=250,G=0,B=0,A=255)
|
||||||
SystemAdminApplyColorToFields=(Rank=True,Player=True,Perk=False,Dosh=False,Kills=False,Assists=False,Health=False,Ping=False)
|
SystemAdminApplyColorToFields=(Rank=True,Player=True,Perk=False,Dosh=False,Kills=False,Assists=False,Health=False,Ping=False)
|
||||||
|
|
||||||
SystemPlayerRank="Player"
|
SystemPlayerRank="Player"
|
||||||
SystemPlayerColor=(R=250,G=250,B=250)
|
SystemPlayerColor=(R=250,G=250,B=250,A=255)
|
||||||
SystemPlayerApplyColorToFields=(Rank=True,Player=True,Perk=False,Dosh=False,Kills=False,Assists=False,Health=False,Ping=False)
|
SystemPlayerApplyColorToFields=(Rank=True,Player=True,Perk=False,Dosh=False,Kills=False,Assists=False,Health=False,Ping=False)
|
||||||
|
|
||||||
HP_Low=40
|
HP_Low=40
|
||||||
@ -54,55 +118,55 @@ struct SCESettings
|
|||||||
|
|
||||||
struct SCEStyle
|
struct SCEStyle
|
||||||
{
|
{
|
||||||
ColorRGBA ServerNameBoxColor;
|
var ColorRGBA ServerNameBoxColor;
|
||||||
ColorRGBA ServerNameTextColor
|
var ColorRGBA ServerNameTextColor;
|
||||||
|
|
||||||
ColorRGBA GameInfoBoxColor;
|
var ColorRGBA GameInfoBoxColor;
|
||||||
ColorRGBA GameInfoTextColor;
|
var ColorRGBA GameInfoTextColor;
|
||||||
|
|
||||||
ColorRGBA WaveBoxColor;
|
var ColorRGBA WaveBoxColor;
|
||||||
ColorRGBA WaveTextColor;
|
var ColorRGBA WaveTextColor;
|
||||||
|
|
||||||
ColorRGBA PlayerCountBoxColor;
|
var ColorRGBA PlayerCountBoxColor;
|
||||||
ColorRGBA PlayerCountTextColor;
|
var ColorRGBA PlayerCountTextColor;
|
||||||
|
|
||||||
ColorRGBA ListHeaderBoxColor;
|
var ColorRGBA ListHeaderBoxColor;
|
||||||
ColorRGBA ListHeaderTextColor;
|
var ColorRGBA ListHeaderTextColor;
|
||||||
|
|
||||||
ColorRGBA LeftHPBoxColorNone;
|
var ColorRGBA LeftHPBoxColorNone;
|
||||||
ColorRGBA LeftHPBoxColorDead;
|
var ColorRGBA LeftHPBoxColorDead;
|
||||||
ColorRGBA LeftHPBoxColorLow;
|
var ColorRGBA LeftHPBoxColorLow;
|
||||||
ColorRGBA LeftHPBoxColorMid;
|
var ColorRGBA LeftHPBoxColorMid;
|
||||||
ColorRGBA LeftHPBoxColorHigh;
|
var ColorRGBA LeftHPBoxColorHigh;
|
||||||
|
|
||||||
ColorRGBA PlayerOwnerBoxColor;
|
var ColorRGBA PlayerOwnerBoxColor;
|
||||||
ColorRGBA PlayerBoxColor;
|
var ColorRGBA PlayerBoxColor;
|
||||||
ColorRGBA StatsBoxColor;
|
var ColorRGBA StatsBoxColor;
|
||||||
|
|
||||||
ColorRGBA RankTextColor;
|
var ColorRGBA RankTextColor;
|
||||||
ColorRGBA ZedTextColor;
|
var ColorRGBA ZedTextColor;
|
||||||
ColorRGBA PerkTextColor;
|
var ColorRGBA PerkTextColor;
|
||||||
ColorRGBA LevelTextColor;
|
var ColorRGBA LevelTextColor;
|
||||||
ColorRGBA AvatarBorderColor;
|
var ColorRGBA AvatarBorderColor;
|
||||||
ColorRGBA PlayerNameTextColor;
|
var ColorRGBA PlayerNameTextColor;
|
||||||
ColorRGBA KillsTextColor;
|
var ColorRGBA KillsTextColor;
|
||||||
ColorRGBA AssistsTextColor;
|
var ColorRGBA AssistsTextColor;
|
||||||
ColorRGBA DoshTextColor;
|
var ColorRGBA DoshTextColor;
|
||||||
|
|
||||||
ColorRGBA StateTextColorLobby;
|
var ColorRGBA StateTextColorLobby;
|
||||||
ColorRGBA StateTextColorReady;
|
var ColorRGBA StateTextColorReady;
|
||||||
ColorRGBA StateTextColorNotReady;
|
var ColorRGBA StateTextColorNotReady;
|
||||||
ColorRGBA StateTextColorNone;
|
var ColorRGBA StateTextColorNone;
|
||||||
ColorRGBA StateTextColorSpectator;
|
var ColorRGBA StateTextColorSpectator;
|
||||||
ColorRGBA StateTextColorDead;
|
var ColorRGBA StateTextColorDead;
|
||||||
ColorRGBA StateTextColorLowHP;
|
var ColorRGBA StateTextColorLowHP;
|
||||||
ColorRGBA StateTextColorMidHP;
|
var ColorRGBA StateTextColorMidHP;
|
||||||
ColorRGBA StateTextColorHighHP;
|
var ColorRGBA StateTextColorHighHP;
|
||||||
|
|
||||||
ColorRGBA PingTextColorNone;
|
var ColorRGBA PingTextColorNone;
|
||||||
ColorRGBA PingTextColorLow;
|
var ColorRGBA PingTextColorLow;
|
||||||
ColorRGBA PingTextColorMid
|
var ColorRGBA PingTextColorMid;
|
||||||
ColorRGBA PingTextColorHigh;
|
var ColorRGBA PingTextColorHigh;
|
||||||
|
|
||||||
StructDefaultProperties
|
StructDefaultProperties
|
||||||
{
|
{
|
||||||
@ -156,68 +220,5 @@ struct SCEStyle
|
|||||||
PingTextColorMid=(R=250,G=250,B=0,A=255)
|
PingTextColorMid=(R=250,G=250,B=0,A=255)
|
||||||
PingTextColorHigh=(R=250,G=0,B=0,A=255)
|
PingTextColorHigh=(R=250,G=0,B=0,A=255)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
struct ColorRGBA
|
|
||||||
{
|
|
||||||
var byte R, G, B, A;
|
|
||||||
|
|
||||||
StructDefaultProperties
|
|
||||||
{
|
|
||||||
R=250
|
|
||||||
G=250
|
|
||||||
B=250
|
|
||||||
A=255
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Fields
|
|
||||||
{
|
|
||||||
var bool Rank;
|
|
||||||
var bool Player;
|
|
||||||
var bool Perk;
|
|
||||||
var bool Dosh;
|
|
||||||
var bool Kills;
|
|
||||||
var bool Assists;
|
|
||||||
var bool Health;
|
|
||||||
var bool Ping;
|
|
||||||
|
|
||||||
StructDefaultProperties
|
|
||||||
{
|
|
||||||
Rank = true;
|
|
||||||
Player = true;
|
|
||||||
Perk = false;
|
|
||||||
Dosh = false;
|
|
||||||
Kills = false;
|
|
||||||
Assists = false;
|
|
||||||
Health = false;
|
|
||||||
Ping = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RankInfo
|
|
||||||
{
|
|
||||||
var int ID;
|
|
||||||
var string Rank;
|
|
||||||
var ColorRGB TextColor;
|
|
||||||
var bool OverrideAdminRank;
|
|
||||||
var Fields ApplyColorToFields;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SteamGroupRankRelation
|
|
||||||
{
|
|
||||||
var string SteamGroupID;
|
|
||||||
var int RankID;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PlayerRankRelation
|
|
||||||
{
|
|
||||||
var string PlayerID;
|
|
||||||
var int RankID;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct UIDRankRelation
|
|
||||||
{
|
|
||||||
var UniqueNetId UID;
|
|
||||||
var int RankID;
|
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user