diff --git a/src/engine/shared/tater_variables.h b/src/engine/shared/tater_variables.h index d2934c23ba4..1764c71730b 100644 --- a/src/engine/shared/tater_variables.h +++ b/src/engine/shared/tater_variables.h @@ -127,7 +127,7 @@ MACRO_CONFIG_INT(ClAutoVerify, tc_auto_verify, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG // Rainbow MACRO_CONFIG_INT(ClRainbow, tc_rainbow, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Turn on rainbow client side") MACRO_CONFIG_INT(ClRainbowOthers, tc_rainbow_others, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Turn on rainbow client side for others") -MACRO_CONFIG_INT(ClRainbowMode, tc_rainbow_mode, 1, 1, 4, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Rainbow mode (1: rainbow, 2: pulse, 3: darkness)") +MACRO_CONFIG_INT(ClRainbowMode, tc_rainbow_mode, 1, 1, 3, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Rainbow mode (1: rainbow, 2: pulse, 3: darkness)") // AAAAAAA MACRO_CONFIG_INT(ClAmIFrozen, EEEfrz, 0, 0, 1, CFGFLAG_CLIENT, "") diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index a104fda0f85..48d486dc99d 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -3238,7 +3238,7 @@ void CMenus::RenderSettingsTClient(CUIRect MainView) const float Margin = 10.0f; const float MarginSmall = 5.0f; const float MarginExtraSmall = 2.5f; - const float MarignBetweenSections = 30.0f; + const float MarginBetweenSections = 30.0f; const float MarginBetweenViews = 30.0f; const float ColorPickerLabelSize = 13.0f; diff --git a/src/game/client/components/rainbow.cpp b/src/game/client/components/rainbow.cpp index e231ee288b0..6fc638298e2 100644 --- a/src/game/client/components/rainbow.cpp +++ b/src/game/client/components/rainbow.cpp @@ -17,60 +17,35 @@ void CRainbow::TransformColor(unsigned char Mode, int Tick, CTeeRenderInfo *pinf int DefTick = Tick % 255; - const ColorHSLA PlayerColBody = ColorHSLA(g_Config.m_ClPlayerColorBody); - const ColorHSLA PlayerColFeet = ColorHSLA(g_Config.m_ClPlayerColorFeet); - - pinfo->m_CustomColoredSkin = true; + ColorRGBA Col; if(Mode == COLORMODE_RAINBOW) - { - const ColorRGBA Col = color_cast(ColorHSLA((float)DefTick / 255.0f, 1.0f, 0.5f)); - pinfo->m_ColorBody = Col; - pinfo->m_ColorFeet = Col; - pinfo->m_BloodColor = Col; - } + Col = color_cast(ColorHSLA((float)DefTick / 255.0f, 1.0f, 0.5f)); else if(Mode == COLORMODE_PULSE) - { - pinfo->m_ColorBody.s = 1.0f; - pinfo->m_ColorFeet.s = 1.0f; - pinfo->m_BloodColor.s = 1.0f; - pinfo->m_ColorBody.l = 0.5f + std::fabs(((float)DefTick / 255.0f) - 0.5f); - pinfo->m_ColorFeet.l = 0.5f + std::fabs(((float)DefTick / 255.0f) - 0.5f); - pinfo->m_BloodColor.l = 0.5f + std::fabs(((float)DefTick / 255.0f) - 0.5f); - pinfo->m_ColorBody.h = (float)DefTick / 255.0f; - pinfo->m_ColorFeet.h = (float)DefTick / 255.0f; - pinfo->m_BloodColor.h = (float)DefTick / 255.0f; - } + Col = color_cast(ColorHSLA(1.0f, (float)DefTick / 255.0f, 1.0f, 0.5f + std::fabs(((float)DefTick / 255.0f) - 0.5f))); else if(Mode == COLORMODE_DARKNESS) - { - pinfo->m_ColorBody = ColorRGBA(0.0f, 0.0f, 0.0f); - pinfo->m_ColorFeet = ColorRGBA(0.0f, 0.0f, 0.0f); - pinfo->m_BloodColor = ColorRGBA(0.0f, 0.0f, 0.0f); - } - else - { - pinfo->m_CustomColoredSkin = true; - pinfo->m_ColorBody = color_cast(PlayerColBody); - pinfo->m_ColorFeet = color_cast(PlayerColFeet); - // pinfo->m_BloodColor = pinfo->m_BloodColor; // TODO reset blood color - } + Col = pinfo->m_ColorBody = ColorRGBA(0.0f, 0.0f, 0.0f); + pinfo->m_ColorBody = Col; + pinfo->m_ColorFeet = Col; + pinfo->m_BloodColor = Col; } void CRainbow::OnRender() { + static int Tick = 0; + ++Tick; for(int i = 0; i < MAX_CLIENTS; i++) { + if(!m_pClient->m_Snap.m_aCharacters[i].m_Active) + continue; + // check if local player bool Local = m_pClient->m_Snap.m_LocalClientId == i; CTeeRenderInfo *RenderInfo = &m_pClient->m_aClients[i].m_RenderInfo; // check if rainbow is enabled if(g_Config.m_ClRainbow && Local) // rainbow is enabled and is own player - { - TransformColor(g_Config.m_ClRainbowMode, m_pClient->m_GameWorld.m_GameTick, RenderInfo); - } + TransformColor(g_Config.m_ClRainbowMode, Tick, RenderInfo); else if(g_Config.m_ClRainbowOthers && !Local) // rainbow is enabled and is not own player - { - TransformColor(g_Config.m_ClRainbowMode, m_pClient->m_GameWorld.m_GameTick, RenderInfo); - } + TransformColor(g_Config.m_ClRainbowMode, Tick, RenderInfo); } }