From 9d80d61c54cd44f89396db11f6477beda1a1ccc3 Mon Sep 17 00:00:00 2001 From: Teero888 Date: Fri, 22 Nov 2024 19:25:42 +0100 Subject: [PATCH] quick behaviour fix --- src/game/client/components/rainbow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/client/components/rainbow.cpp b/src/game/client/components/rainbow.cpp index 5d3b2f18248..e3166483528 100644 --- a/src/game/client/components/rainbow.cpp +++ b/src/game/client/components/rainbow.cpp @@ -11,6 +11,7 @@ #include #include "base/color.h" +#include "engine/shared/protocol.h" #include "rainbow.h" void CRainbow::TransformColor(unsigned char Mode, int Tick, CTeeRenderInfo *pInfo) @@ -54,8 +55,9 @@ void CRainbow::TransformColor(unsigned char Mode, int Tick, CTeeRenderInfo *pInf void CRainbow::OnRender() { if(g_Config.m_ClRainbowOthers) - for(auto &Client : m_pClient->m_aClients) - TransformColor(g_Config.m_ClRainbowMode, m_pClient->m_GameWorld.m_GameTick, &Client.m_RenderInfo); - else if(g_Config.m_ClRainbow) + for(int i = 0; i < MAX_CLIENTS; ++i) + if(i != m_pClient->m_Snap.m_LocalClientId) + TransformColor(g_Config.m_ClRainbowMode, m_pClient->m_GameWorld.m_GameTick, &m_pClient->m_aClients[i].m_RenderInfo); + if(g_Config.m_ClRainbow) TransformColor(g_Config.m_ClRainbowMode, m_pClient->m_GameWorld.m_GameTick, &m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientId].m_RenderInfo); }