Skip to content

Commit

Permalink
opt out convar for chat messages about items
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Dec 6, 2024
1 parent 0a7313e commit 8580466
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/game/client/swarm/vgui/asw_hud_chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CHAT_COLOR_STUB( g );
CHAT_COLOR_STUB( b );
#undef CHAT_COLOR_STUB
ConVar rd_chat_colorful_player_names( "rd_chat_colorful_player_names", "1", FCVAR_ARCHIVE, "If set 1, the player name in the chat box will become colorful" );

ConVar rd_chat_item_messages( "rd_chat_item_messages", "1", FCVAR_NONE, "Display a message in chat when a player obtains an inventory item." );

//=====================
//CHudChat
Expand Down Expand Up @@ -439,7 +439,10 @@ void CHudChat::MsgFunc_RDItemPickupMsg( bf_read &msg )
char szFullMessage[2048];
V_UnicodeToUTF8( wszFullMessage, szFullMessage, sizeof( szFullMessage ) );

ChatPrintf( iPlayer, CHAT_FILTER_NONE, "%s", szFullMessage );
if ( rd_chat_item_messages.GetBool() )
{
ChatPrintf( iPlayer, CHAT_FILTER_NONE, "%s", szFullMessage );
}
}

int CHudChat::GetChatInputOffset( void )
Expand Down

0 comments on commit 8580466

Please sign in to comment.