mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
More stuff goes in HU_AddChatText, fixed /pm list not having the correct coords if kartspeedometer was on.
This commit is contained in:
parent
346c6bce96
commit
49f2c62b5d
3 changed files with 29 additions and 26 deletions
|
@ -2812,7 +2812,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
msg = KICK_MSG_CON_FAIL;
|
||||
}
|
||||
|
||||
CONS_Printf("\x82%s ", player_names[pnum]);
|
||||
//CONS_Printf("\x82%s ", player_names[pnum]);
|
||||
|
||||
// If a verified admin banned someone, the server needs to know about it.
|
||||
// If the playernum isn't zero (the server) then the server needs to record the ban.
|
||||
|
@ -2829,15 +2829,15 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
switch (msg)
|
||||
{
|
||||
case KICK_MSG_GO_AWAY:
|
||||
CONS_Printf(M_GetText("has been kicked (Go away)\n"));
|
||||
HU_AddChatText(va("\x82*%s has been kicked (Go away)", player_names[pnum]), false);
|
||||
break;
|
||||
#ifdef NEWPING
|
||||
case KICK_MSG_PING_HIGH:
|
||||
CONS_Printf(M_GetText("left the game (Broke ping limit)\n"));
|
||||
HU_AddChatText(va("\x82*%s left the game (Broke ping limit)", player_names[pnum]), false);
|
||||
break;
|
||||
#endif
|
||||
case KICK_MSG_CON_FAIL:
|
||||
CONS_Printf(M_GetText("left the game (Synch failure)\n"));
|
||||
HU_AddChatText(va("\x82*%s left the game (Synch Failure)", player_names[pnum]), false);
|
||||
|
||||
if (M_CheckParm("-consisdump")) // Helps debugging some problems
|
||||
{
|
||||
|
@ -2873,22 +2873,22 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
}
|
||||
break;
|
||||
case KICK_MSG_TIMEOUT:
|
||||
CONS_Printf(M_GetText("left the game (Connection timeout)\n"));
|
||||
HU_AddChatText(va("\x82*%s left the game (Connection timeout)", player_names[pnum]), false);
|
||||
break;
|
||||
case KICK_MSG_PLAYER_QUIT:
|
||||
if (netgame) // not splitscreen/bots
|
||||
CONS_Printf(M_GetText("left the game\n"));
|
||||
HU_AddChatText(va("\x82*%s left the game", player_names[pnum]), false);
|
||||
break;
|
||||
case KICK_MSG_BANNED:
|
||||
CONS_Printf(M_GetText("has been banned (Don't come back)\n"));
|
||||
HU_AddChatText(va("\x82*%s has been banned (Don't come back)", player_names[pnum]), false);
|
||||
break;
|
||||
case KICK_MSG_CUSTOM_KICK:
|
||||
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
|
||||
CONS_Printf(M_GetText("has been kicked (%s)\n"), reason);
|
||||
HU_AddChatText(va("\x82*%s has been kicked (%s)", player_names[pnum], reason), false);
|
||||
break;
|
||||
case KICK_MSG_CUSTOM_BAN:
|
||||
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
|
||||
CONS_Printf(M_GetText("has been banned (%s)\n"), reason);
|
||||
HU_AddChatText(va("\x82*%s has been banned (%s)", player_names[pnum], reason), false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3167,9 +3167,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
if (newplayernum+1 > doomcom->numslots)
|
||||
doomcom->numslots = (INT16)(newplayernum+1);
|
||||
|
||||
if (netgame)
|
||||
CONS_Printf(M_GetText("Player %d has joined the game (node %d)\n"), newplayernum+1, node);
|
||||
|
||||
// the server is creating my player
|
||||
if (node == mynode)
|
||||
{
|
||||
|
@ -3228,13 +3225,19 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
D_SendPlayerConfig();
|
||||
addedtogame = true;
|
||||
}
|
||||
else if (server && netgame && cv_showjoinaddress.value)
|
||||
{
|
||||
const char *address;
|
||||
if (I_GetNodeAddress && (address = I_GetNodeAddress(node)) != NULL)
|
||||
CONS_Printf(M_GetText("Player Address is %s\n"), address);
|
||||
|
||||
if (netgame)
|
||||
{
|
||||
if (server && netgame && cv_showjoinaddress.value)
|
||||
{
|
||||
const char *address;
|
||||
if (I_GetNodeAddress && (address = I_GetNodeAddress(node)) != NULL)
|
||||
HU_AddChatText(va("\x82*Player %d has joined the game (node %d) (%s)", newplayernum+1, node, address), false); // merge join notification + IP to avoid clogging console/chat.
|
||||
}
|
||||
else
|
||||
HU_AddChatText(va("\x82*Player %d has joined the game (node %d)", newplayernum+1, node), false);
|
||||
}
|
||||
|
||||
|
||||
if (server && multiplayer && motd[0] != '\0')
|
||||
COM_BufAddText(va("sayto %d %s\n", newplayernum, motd));
|
||||
|
||||
|
|
|
@ -1140,8 +1140,8 @@ static void SetPlayerName(INT32 playernum, char *newname)
|
|||
if (strcasecmp(newname, player_names[playernum]) != 0)
|
||||
{
|
||||
if (netgame)
|
||||
CONS_Printf(M_GetText("%s renamed to %s\n"),
|
||||
player_names[playernum], newname);
|
||||
HU_AddChatText(va("\x82*%s renamed to %s", player_names[playernum], newname), false);
|
||||
|
||||
strcpy(player_names[playernum], newname);
|
||||
}
|
||||
}
|
||||
|
@ -5152,9 +5152,9 @@ static void Mute_OnChange(void)
|
|||
return; // avoid having this notification put in our console / log when we boot the server.
|
||||
|
||||
if (cv_mute.value)
|
||||
HU_AddChatText(M_GetText("*Chat has been muted."), false);
|
||||
HU_AddChatText(M_GetText("\x82*Chat has been muted."), false);
|
||||
else
|
||||
HU_AddChatText(M_GetText("*Chat is no longer muted."), false);
|
||||
HU_AddChatText(M_GetText("\x82*Chat is no longer muted."), false);
|
||||
}
|
||||
|
||||
/** Hack to clear all changed flags after game start.
|
||||
|
|
|
@ -1634,15 +1634,15 @@ static void HU_DrawChat(void)
|
|||
{
|
||||
char name[MAXPLAYERNAME+1];
|
||||
strlcpy(name, player_names[i], 7); // shorten name to 7 characters.
|
||||
V_DrawFillConsoleMap(chatx+ cv_chatwidth.value + 2, p_dispy- (6*count), 48, 6, 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT); // fill it like the chat so the text doesn't become hard to read because of the hud.
|
||||
V_DrawSmallString(chatx+ cv_chatwidth.value + 4, p_dispy- (6*count), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, va("\x82%d\x80 - %s", i, name));
|
||||
V_DrawFillConsoleMap(chatx+ cv_chatwidth.value + 2, p_dispy- (6*count) - (cv_kartspeedometer.value ? 16 : 0), 48, 6, 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT); // fill it like the chat so the text doesn't become hard to read because of the hud.
|
||||
V_DrawSmallString(chatx+ cv_chatwidth.value + 4, p_dispy- (6*count) - (cv_kartspeedometer.value ? 16 : 0), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, va("\x82%d\x80 - %s", i, name));
|
||||
count++;
|
||||
}
|
||||
}
|
||||
if (count == 0) // no results.
|
||||
{
|
||||
V_DrawFillConsoleMap(chatx-50, p_dispy- (6*count), 48, 6, 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT); // fill it like the chat so the text doesn't become hard to read because of the hud.
|
||||
V_DrawSmallString(chatx-48, p_dispy- (6*count), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, "NO RESULT.");
|
||||
V_DrawFillConsoleMap(chatx+ cv_chatwidth.value + 2, p_dispy- (6*count) - (cv_kartspeedometer.value ? 16 : 0), 48, 6, 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT); // fill it like the chat so the text doesn't become hard to read because of the hud.
|
||||
V_DrawSmallString(chatx+ cv_chatwidth.value + 4, p_dispy- (6*count) - (cv_kartspeedometer.value ? 16 : 0), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, "NO RESULT.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue