Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
rainbow is son of the bitch+button fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
StormAxs committed Dec 19, 2023
1 parent 2965157 commit 9e1a202
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/engine/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ void CClient::Connect(const char *pAddress, const char *pPassword)
str_copy(m_aConnectAddressStr, pAddress);

char aMsg[512];
str_format(aMsg, sizeof(aMsg), "connecting to '%s'", m_aConnectAddressStr);
str_format(aMsg, sizeof(aMsg), "Joining... '%s'", m_aConnectAddressStr);
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "client", aMsg, gs_ClientNetworkPrintColor);

ServerInfoRequest();
Expand Down
21 changes: 19 additions & 2 deletions src/game/client/components/menus_ingame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,15 +956,32 @@ void CMenus::RenderStats(CUIRect MainView)
MP2.Draw(vec4(1, 1, 1, 0.25f), IGraphics::CORNER_B, 2.0f);

char Welcome [128];
if (strcmp(Client()->PlayerName(), "-StormAx") == 0)
const char *names[] =
{
"meloƞ", "-StormAx", "我叫芙焦", "Mʎɹ シ", "Cheeru", "Mónik"
};

for
(int i = 0; i < sizeof(names) / sizeof(names[0]); i++) {
if (strcmp(Client()->PlayerName(), names[i]) == 0)
{
break;
}
ColorRGBA col = color_cast<ColorRGBA>(ColorHSVA(round_to_int(LocalTime() * 15.f) % 255 /255.f, 1.f, 1.f));
TextRender()->TextColor(col);
}

static CStatsPlayer s_StatsPlayer;

str_format(Welcome, sizeof(Welcome), " Welcome Back, %s", Client()->PlayerName());
UI()->DoLabel(&WB, Welcome, 40.0f, TEXTALIGN_ML);
return TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);



str_format(Welcome, sizeof(Welcome), " Current points: %s", s_StatsPlayer.Points);
UI()->DoLabel(&CP, Welcome, 40.0f, TEXTALIGN_ML);


}
else if(s_StatsPage == 1)
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/components/menus_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3481,7 +3481,7 @@ void CMenus::RenderSettingsStA(CUIRect MainView)
g_Config.m_ClAutoVerify ^= 1;

Left.HSplitTop(20.0f, &Button, &Left);
if(DoButton_CheckBox(&g_Config.m_ClAutoVerify, Localize("Display skin name in nameplates"), g_Config.m_ClAutoVerify, &Button))
if(DoButton_CheckBox(&g_Config.m_ClShowSkinName, Localize("Display skin name in nameplates"), g_Config.m_ClShowSkinName, &Button))
g_Config.m_ClShowSkinName ^= 1;

}
Expand Down
1 change: 0 additions & 1 deletion src/game/client/components/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

CStats::CStats() = default;


void CStats::FetchPlayer(CStatsPlayer *pStatsDest, const char *pPlayer)
{
char aUrl_DDStats[256];
Expand Down
9 changes: 6 additions & 3 deletions src/game/client/components/players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,20 +474,23 @@ void CPlayers::RenderPlayer(
}

// rainbow

bool IsRainbowBody = g_Config.m_ClRainbow,
IsRainbowFeet = g_Config.m_ClRainbow;
g_Config.m_ClRainbow = Local == 1;
g_Config.m_ClRainbow = Local;

if(g_Config.m_ClRainbow == 1)
{
IsRainbowBody = true;
IsRainbowFeet = true;
}
else
{
IsRainbowBody = false;
IsRainbowFeet = false;
IsRainbowBody = 0;
IsRainbowFeet = 0;
}


// draw gun
{
static vec2 s_aGunPositions[MAX_CLIENTS];
Expand Down

0 comments on commit 9e1a202

Please sign in to comment.