From 1045296bb7e14374a95ee3a4d92b9e2256663acf Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Tue, 23 Jan 2024 23:21:19 -0800 Subject: [PATCH] Competitive scoreboard: fix crash --- ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua b/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua index 14ad8f72..375d1a03 100644 --- a/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua +++ b/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua @@ -289,11 +289,12 @@ CoD.CompetitiveScoreboard.CompetitiveScoreHide = function(PlayerScoreListWidget, end CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function(Text, ClientIndex, AnimDelay) + local PlayerColorsIndex = (ClientIndex - 1) % 4 + 1 if not AnimDelay then AnimDelay = 0 end Text:beginAnimation("showplayercolor", AnimDelay) - Text:setRGB(CoD.Zombie.PlayerColors[ClientIndex].r, CoD.Zombie.PlayerColors[ClientIndex].g, CoD.Zombie.PlayerColors[ClientIndex].b) + Text:setRGB(CoD.Zombie.PlayerColors[PlayerColorsIndex].r, CoD.Zombie.PlayerColors[PlayerColorsIndex].g, CoD.Zombie.PlayerColors[PlayerColorsIndex].b) end CoD.CompetitiveScoreboard.UpdateVisibility = function(CompetitiveScoreboardWidget, ClientInstance)