mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Show notice of a password-protected server on the join screen
This commit is contained in:
parent
99a934e352
commit
1cd8c15e8c
1 changed files with 18 additions and 0 deletions
|
|
@ -1179,6 +1179,8 @@ static void CV_LoadPlayerNames(UINT8 **p)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
#ifdef CLIENT_LOADINGSCREEN
|
||||||
|
static UINT32 SL_SearchServer(INT32 node);
|
||||||
|
|
||||||
//
|
//
|
||||||
// CL_DrawConnectionStatus
|
// CL_DrawConnectionStatus
|
||||||
//
|
//
|
||||||
|
|
@ -1212,12 +1214,28 @@ static inline void CL_DrawConnectionStatus(void)
|
||||||
{
|
{
|
||||||
char asterisks[33];
|
char asterisks[33];
|
||||||
size_t sl = min(32, strlen(cl_challengepassword));
|
size_t sl = min(32, strlen(cl_challengepassword));
|
||||||
|
UINT32 i;
|
||||||
|
|
||||||
memset(asterisks, '*', sl);
|
memset(asterisks, '*', sl);
|
||||||
memset(asterisks+sl, 0, 33-sl);
|
memset(asterisks+sl, 0, 33-sl);
|
||||||
|
|
||||||
V_DrawString(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, V_MONOSPACE|V_ALLOWLOWERCASE, asterisks);
|
V_DrawString(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, V_MONOSPACE|V_ALLOWLOWERCASE, asterisks);
|
||||||
|
|
||||||
|
i = SL_SearchServer(servernode);
|
||||||
|
|
||||||
|
if (i == -1)
|
||||||
|
{
|
||||||
|
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT/2-8, 32, 1);
|
||||||
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, V_REDMAP, M_GetText("This server is password protected."));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT/2-8-8, 32, 3);
|
||||||
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2-8, V_REDMAP, M_GetText("This server,"));
|
||||||
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, V_ALLOWLOWERCASE, serverlist[i].info.servername);
|
||||||
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2+8, V_REDMAP, M_GetText("is password protected."));
|
||||||
|
}
|
||||||
|
|
||||||
cltext = M_GetText(cl_challengeattempted ? "Incorrect password. Please try again." : "Please enter the server password.");
|
cltext = M_GetText(cl_challengeattempted ? "Incorrect password. Please try again." : "Please enter the server password.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue