Skip to content

Commit

Permalink
quick behaviour fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Teero888 committed Nov 22, 2024
1 parent 7b52d3d commit 9d80d61
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/game/client/components/rainbow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <cmath>

#include "base/color.h"
#include "engine/shared/protocol.h"
#include "rainbow.h"

void CRainbow::TransformColor(unsigned char Mode, int Tick, CTeeRenderInfo *pInfo)
Expand Down Expand Up @@ -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);
}

0 comments on commit 9d80d61

Please sign in to comment.