fix warnings

This commit is contained in:
GenZmeY 2021-06-07 04:42:49 +03:00
parent 0430b5db54
commit 2732facdb8
6 changed files with 61 additions and 48 deletions

View File

@ -22,11 +22,11 @@ var array<PlayerGroupEntry> PlayerGroups;
var array<UIDInfoEntry> PlayerInfos;
var string SystemAdminRank;
var TextColor SystemAdminColor;
var ColorRGB SystemAdminColor;
var Fields SystemAdminApplyColorToFields;
var string SystemPlayerRank;
var TextColor SystemPlayerColor;
var ColorRGB SystemPlayerColor;
var Fields SystemPlayerApplyColorToFields;
function InitMenu()
@ -349,7 +349,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
if (!HasGroup || (HasGroup && !Group.OverrideAdminRank))
{
Group.Rank = SystemAdminRank;
Group.Color = SystemAdminColor;
Group.TextColor = SystemAdminColor;
Group.ApplyColorToFields = SystemAdminApplyColorToFields;
HasGroup = true;
}
@ -359,7 +359,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
if (!HasGroup)
{
Group.Rank = SystemPlayerRank;
Group.Color = SystemPlayerColor;
Group.TextColor = SystemPlayerColor;
Group.ApplyColorToFields = SystemPlayerApplyColorToFields;
HasGroup = true;
}
@ -437,7 +437,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
// Rank
if (Group.ApplyColorToFields.Rank)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
S = Group.Rank;
DrawTextShadowHLeftVCenter(S, RankXPos, TextYOffset, FontScalar);
C.SetDrawColor(250,250,250,255);
@ -447,7 +447,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
{
C.SetDrawColor(255,0,0,255);
if (Group.ApplyColorToFields.Perk)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
C.SetPos (PerkXPos, YOffset - ((Height-5) * 0.5f));
C.DrawRect (Height-5, Height-5, Texture2D'UI_Widgets.MenuBarWidget_SWF_IF');
@ -483,7 +483,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
C.SetDrawColor(250,250,250,255);
if (Group.ApplyColorToFields.Perk)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
S = Level@KFPRI.CurrentPerkClass.default.PerkName;
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
}
@ -491,7 +491,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
{
C.SetDrawColor(250,250,250,255);
if (Group.ApplyColorToFields.Perk)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
S = "No Perk";
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
}
@ -515,7 +515,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
// Player
if (Group.ApplyColorToFields.Player)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
if( Len(KFPRI.PlayerName) > 25 )
S = Left(KFPRI.PlayerName, 25);
else S = KFPRI.PlayerName;
@ -525,13 +525,13 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
// Kill
if (Group.ApplyColorToFields.Kills)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(string (KFPRI.Kills), KillsXPos, TextYOffset, KillsWBox, FontScalar);
C.SetDrawColor(250,250,250,255);
// Assist
if (Group.ApplyColorToFields.Assists)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar);
C.SetDrawColor(250,250,250,255);
@ -547,7 +547,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
StrValue = GetNiceSize(int(KFPRI.Score));
}
if (Group.ApplyColorToFields.Dosh)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(StrValue, CashXPos, TextYOffset, CashWBox, FontScalar);
C.SetDrawColor(250,250,250,255);
@ -586,7 +586,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
}
if (Group.ApplyColorToFields.Health)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(S, HealthXPos, TextYOffset, HealthWBox, FontScalar);
C.SetDrawColor(250,250,250,255);
@ -609,7 +609,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
C.TextSize(MaxPing, XL, YL, FontScalar, FontScalar);
if (Group.ApplyColorToFields.Ping)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255);
C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(S, PingXPos, TextYOffset, PingWBox/2, FontScalar);
C.SetDrawColor(250,250,250,255);

View File

@ -53,22 +53,22 @@ private function InitConfig()
// Default admin rank
class'SystemAdminGroup'.default.Rank = "Admin";
class'SystemAdminGroup'.default.Color.R = 250;
class'SystemAdminGroup'.default.Color.G = 0;
class'SystemAdminGroup'.default.Color.B = 0;
class'SystemAdminGroup'.default.TextColor.R = 250;
class'SystemAdminGroup'.default.TextColor.G = 0;
class'SystemAdminGroup'.default.TextColor.B = 0;
// Default player rank
class'SystemPlayerGroup'.default.Rank = "Player";
class'SystemPlayerGroup'.default.Color.R = 250;
class'SystemPlayerGroup'.default.Color.G = 250;
class'SystemPlayerGroup'.default.Color.B = 250;
class'SystemPlayerGroup'.default.TextColor.R = 250;
class'SystemPlayerGroup'.default.TextColor.G = 250;
class'SystemPlayerGroup'.default.TextColor.B = 250;
// Example rank for player(s)
ExampleGroup.ID = 0;
ExampleGroup.Rank = "SCE Creator";
ExampleGroup.Color.R = 130;
ExampleGroup.Color.G = 250;
ExampleGroup.Color.B = 235;
ExampleGroup.TextColor.R = 130;
ExampleGroup.TextColor.G = 250;
ExampleGroup.TextColor.B = 235;
ExampleGroup.OverrideAdminRank = true;
class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup);
@ -80,9 +80,9 @@ private function InitConfig()
// Example rank for steam group members
ExampleGroup.ID = 1;
ExampleGroup.Rank = "[MSK-GS]";
ExampleGroup.Color.R = 130;
ExampleGroup.Color.G = 250;
ExampleGroup.Color.B = 130;
ExampleGroup.TextColor.R = 130;
ExampleGroup.TextColor.G = 250;
ExampleGroup.TextColor.B = 130;
ExampleGroup.OverrideAdminRank = false;
class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup);
@ -156,10 +156,10 @@ function AddPlayerInfo(Controller C)
RepClient.RepInfo.PlayerInfos = UIDInfos;
RepClient.RepInfo.PlayerGroups = class'PlayerGroups'.default.PlayerGroup;
RepClient.RepInfo.SystemAdminRank = class'SystemAdminGroup'.default.Rank;
RepClient.RepInfo.SystemAdminColor = class'SystemAdminGroup'.default.Color;
RepClient.RepInfo.SystemAdminColor = class'SystemAdminGroup'.default.TextColor;
RepClient.RepInfo.SystemAdminApplyColorToFields = class'SystemAdminGroup'.default.ApplyColorToFields;
RepClient.RepInfo.SystemPlayerRank = class'SystemPlayerGroup'.default.Rank;
RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerGroup'.default.Color;
RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerGroup'.default.TextColor;
RepClient.RepInfo.SystemPlayerApplyColorToFields = class'SystemPlayerGroup'.default.ApplyColorToFields;
RepClient.RepInfo.ClientStartReplication();

View File

@ -4,11 +4,11 @@ var public array<UIDInfoEntry> PlayerInfos;
var public array<PlayerGroupEntry> PlayerGroups;
var public string SystemAdminRank;
var public TextColor SystemAdminColor;
var public ColorRGB SystemAdminColor;
var public Fields SystemAdminApplyColorToFields;
var public string SystemPlayerRank;
var public TextColor SystemPlayerColor;
var public ColorRGB SystemPlayerColor;
var public Fields SystemPlayerApplyColorToFields;
var private bool SystemFinished, GroupsFinished, InfosFinished;
@ -96,10 +96,10 @@ private reliable client final function InfosReplicationFinished()
private reliable client final function ClientInitSystem(
string _SystemAdminRank,
TextColor _SystemAdminColor,
ColorRGB _SystemAdminColor,
Fields _SystemAdminApplyColorToFields,
string _SystemPlayerRank,
TextColor _SystemPlayerColor,
ColorRGB _SystemPlayerColor,
Fields _SystemPlayerApplyColorToFields)
{
SystemAdminRank = _SystemAdminRank;

View File

@ -3,5 +3,5 @@ class SystemAdminGroup extends Object
config(ScoreboardExt);
var config string Rank;
var config TextColor Color;
var config ColorRGB TextColor;
var config Fields ApplyColorToFields;

View File

@ -3,5 +3,5 @@ class SystemPlayerGroup extends Object
config(ScoreboardExt);
var config string Rank;
var config TextColor Color;
var config ColorRGB TextColor;
var config Fields ApplyColorToFields;

View File

@ -1,6 +1,6 @@
class Types extends Object;
struct TextColor
struct ColorRGB
{
var byte R, G, B;
@ -12,6 +12,19 @@ struct TextColor
}
};
struct ColorRGBA
{
var byte R, G, B, A;
StructDefaultProperties
{
R=250
G=250
B=250
A=255
}
};
struct Fields
{
var bool Rank;
@ -40,7 +53,7 @@ struct PlayerGroupEntry
{
var int ID;
var string Rank;
var TextColor Color;
var ColorRGB TextColor;
var bool OverrideAdminRank;
var Fields ApplyColorToFields;
};