# HG changeset patch # User Adam Kaminski # Date 1627841601 14400 # Sun Aug 01 14:13:21 2021 -0400 # Node ID 24c896e788e054b1265d7e29e4eb28f235a8244d # Parent 9a083c933a9d1447ae663c4dec0b2fb38c9f9e87 Added some missing checks to the "messagemode2" CCMD. diff -r 9a083c933a9d -r 24c896e788e0 src/chat.cpp --- a/src/chat.cpp Sun Aug 01 12:21:37 2021 -0400 +++ b/src/chat.cpp Sun Aug 01 14:13:21 2021 -0400 @@ -1694,8 +1694,13 @@ return; } - if ( NETWORK_GetState() != NETSTATE_SERVER ) + // [AK] Make sure we have teammates to talk to before we use team chat. + if (( NETWORK_GetState( ) != NETSTATE_SERVER ) && ( GAMEMODE_GetCurrentFlags( ) & GMF_PLAYERSONTEAMS )) { + // Not on a team. No one to talk to. + if (( players[consoleplayer].bOnTeam == false ) && ( PLAYER_IsTrueSpectator( &players[consoleplayer] ) == false )) + return; + CHAT_SetChatMode( CHATMODE_TEAM ); C_HideConsole( ); g_ChatBuffer.Clear();