diff --git a/src/game/client/components/skins7.cpp b/src/game/client/components/skins7.cpp index 458d5d721..fb0f0bdf9 100644 --- a/src/game/client/components/skins7.cpp +++ b/src/game/client/components/skins7.cpp @@ -476,11 +476,7 @@ void CSkins7::RandomizeSkin(int Dummy) ColorRGBA CSkins7::GetColor(int Value, bool UseAlpha) const { - float Dark = DARKEST_COLOR_LGT / 255.0f; - ColorRGBA Color = color_cast(ColorHSLA(Value).UnclampLighting(Dark)); - float Alpha = UseAlpha ? ((Value >> 24) & 0xff) / 255.0f : 1.0f; - Color.a = Alpha; - return Color; + return color_cast(ColorHSLA(Value, UseAlpha).UnclampLighting(DARKEST_COLOR_LGT)); } ColorRGBA CSkins7::GetTeamColor(int UseCustomColors, int PartColor, int Team, int Part) const diff --git a/src/game/client/components/skins7.h b/src/game/client/components/skins7.h index a5b0d9fcb..d75dac88f 100644 --- a/src/game/client/components/skins7.h +++ b/src/game/client/components/skins7.h @@ -20,14 +20,14 @@ public: SKINFLAG_SPECIAL = 1 << 0, SKINFLAG_STANDARD = 1 << 1, - DARKEST_COLOR_LGT = 61, - NUM_COLOR_COMPONENTS = 4, HAT_NUM = 2, HAT_OFFSET_SIDE = 2, }; + static constexpr float DARKEST_COLOR_LGT = 61.0f / 255.0f; + struct CSkinPart { int m_Flags;