Skip to content

Commit

Permalink
DISCORD: limit to human players and fixed invalid spectator line
Browse files Browse the repository at this point in the history
see issue #305
  • Loading branch information
mgerhardy committed Nov 19, 2024
1 parent 30c442a commit 26831a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/game/g_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ const char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot) {
// if ( !client->areabits )
// client->areabits = G_Alloc( (trap_AAS_PointReachabilityAreaIndex( NULL ) + 7) / 8 );

if (firstTime && G_DISCORD_WantMessages(DISCORD_MSG_PLAYER_CONNECT)) {
if (!isBot && firstTime && G_DISCORD_WantMessages(DISCORD_MSG_PLAYER_CONNECT)) {
const qboolean isTeam = g_gametype.integer >= GT_TEAM;
const char *map = level.shortmapname;
const char *arenaInfo = G_GetArenaInfoByMap(map);
Expand Down Expand Up @@ -1015,7 +1015,7 @@ const char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot) {

if (isTeam) {
buf = va("%i %s playing **%s**\n* Blue Noses: %i (and %i bots)\n* Red Pads: %i (and %i bots)\n* "
"Spectators: %i)",
"Spectators: %i",
humanAll, padPlayerStr, map, humanCount[TEAM_BLUE], botCount[TEAM_BLUE], humanCount[TEAM_RED],
botCount[TEAM_RED], humanCount[TEAM_SPECTATOR]);
} else {
Expand Down

0 comments on commit 26831a7

Please sign in to comment.