From ad77bf6d5181ce72dd5015c3dd014f95965eee47 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sun, 13 Jun 2021 10:01:07 +0300 Subject: [PATCH] fix 1 player shape --- ScoreboardExt/Classes/KFScoreBoard.uc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ScoreboardExt/Classes/KFScoreBoard.uc b/ScoreboardExt/Classes/KFScoreBoard.uc index c57a84a..783d92a 100644 --- a/ScoreboardExt/Classes/KFScoreBoard.uc +++ b/ScoreboardExt/Classes/KFScoreBoard.uc @@ -430,9 +430,9 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float if (!Settings.State.Dynamic) SetDrawColor(C, Settings.Style.LeftStateBoxColor); - if (Index == 0) + if (KFPRIArray.Length > 1 && Index == 0) Shape = Settings.Style.ShapeLeftStateBoxTopPlayer; - else if (Index == KFPRIArray.Length - 1) + else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1) Shape = Settings.Style.ShapeLeftStateBoxBottomPlayer; else Shape = Settings.Style.ShapeLeftStateBoxMidPlayer; @@ -452,9 +452,9 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float else SetDrawColor(C, Settings.Style.PlayerBoxColor); - if (Index == 0) + if (KFPRIArray.Length > 1 && Index == 0) Shape = Settings.Style.ShapePlayerBoxTopPlayer; - else if (Index == KFPRIArray.Length - 1) + else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1) Shape = Settings.Style.ShapePlayerBoxBottomPlayer; else Shape = Settings.Style.ShapePlayerBoxMidPlayer; @@ -465,9 +465,9 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float XPos += BoxWidth; // Right stats box - if (Index == 0) + if (KFPRIArray.Length > 1 && Index == 0) Shape = Settings.Style.ShapeStatsBoxTopPlayer; - else if (Index == KFPRIArray.Length - 1) + else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1) Shape = Settings.Style.ShapeStatsBoxBottomPlayer; else Shape = Settings.Style.ShapeStatsBoxMidPlayer;