mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 13:40:45 +00:00
Some messages relevant to discussions now go in the chat.
This commit is contained in:
parent
2fdf27c507
commit
a31b85e124
2 changed files with 20 additions and 14 deletions
|
@ -2779,17 +2779,17 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
||||||
switch (msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
case KICK_MSG_GO_AWAY:
|
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);
|
||||||
kickreason = KR_KICK;
|
kickreason = KR_KICK;
|
||||||
break;
|
break;
|
||||||
#ifdef NEWPING
|
#ifdef NEWPING
|
||||||
case KICK_MSG_PING_HIGH:
|
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);
|
||||||
kickreason = KR_PINGLIMIT;
|
kickreason = KR_PINGLIMIT;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case KICK_MSG_CON_FAIL:
|
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);
|
||||||
kickreason = KR_SYNCH;
|
kickreason = KR_SYNCH;
|
||||||
|
|
||||||
if (M_CheckParm("-consisdump")) // Helps debugging some problems
|
if (M_CheckParm("-consisdump")) // Helps debugging some problems
|
||||||
|
@ -2826,26 +2826,26 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KICK_MSG_TIMEOUT:
|
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);
|
||||||
kickreason = KR_TIMEOUT;
|
kickreason = KR_TIMEOUT;
|
||||||
break;
|
break;
|
||||||
case KICK_MSG_PLAYER_QUIT:
|
case KICK_MSG_PLAYER_QUIT:
|
||||||
if (netgame) // not splitscreen/bots
|
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);
|
||||||
kickreason = KR_LEAVE;
|
kickreason = KR_LEAVE;
|
||||||
break;
|
break;
|
||||||
case KICK_MSG_BANNED:
|
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);
|
||||||
kickreason = KR_BAN;
|
kickreason = KR_BAN;
|
||||||
break;
|
break;
|
||||||
case KICK_MSG_CUSTOM_KICK:
|
case KICK_MSG_CUSTOM_KICK:
|
||||||
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
|
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);
|
||||||
kickreason = KR_KICK;
|
kickreason = KR_KICK;
|
||||||
break;
|
break;
|
||||||
case KICK_MSG_CUSTOM_BAN:
|
case KICK_MSG_CUSTOM_BAN:
|
||||||
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
|
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);
|
||||||
kickreason = KR_BAN;
|
kickreason = KR_BAN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3143,11 +3143,17 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
||||||
D_SendPlayerConfig();
|
D_SendPlayerConfig();
|
||||||
addedtogame = true;
|
addedtogame = true;
|
||||||
}
|
}
|
||||||
else if (server && netgame && cv_showjoinaddress.value)
|
|
||||||
|
if (netgame)
|
||||||
{
|
{
|
||||||
const char *address;
|
if (server && cv_showjoinaddress.value)
|
||||||
if (I_GetNodeAddress && (address = I_GetNodeAddress(node)) != NULL)
|
{
|
||||||
CONS_Printf(M_GetText("Player Address is %s\n"), address);
|
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 you don't wanna see the join address.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server && multiplayer && motd[0] != '\0')
|
if (server && multiplayer && motd[0] != '\0')
|
||||||
|
|
|
@ -995,8 +995,8 @@ static void SetPlayerName(INT32 playernum, char *newname)
|
||||||
if (strcasecmp(newname, player_names[playernum]) != 0)
|
if (strcasecmp(newname, player_names[playernum]) != 0)
|
||||||
{
|
{
|
||||||
if (netgame)
|
if (netgame)
|
||||||
CONS_Printf(M_GetText("%s renamed to %s\n"),
|
HU_AddChatText(va("\x82*%s renamed to %s", player_names[playernum], newname), false);
|
||||||
player_names[playernum], newname);
|
|
||||||
strcpy(player_names[playernum], newname);
|
strcpy(player_names[playernum], newname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue