diff options
Diffstat (limited to 'src/cgame/cg_servercmds.c')
-rw-r--r-- | src/cgame/cg_servercmds.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index b30cae4d..60d6deba 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -385,88 +385,6 @@ static void CG_ConfigStringModified( void ) /* -======================= -CG_AddToTeamChat - -======================= -*/ -static void CG_AddToTeamChat( const char *str ) -{ - int len; - char *p, *ls; - int lastcolor; - int chatHeight; - - if( cg_teamChatHeight.integer < TEAMCHAT_HEIGHT ) - chatHeight = cg_teamChatHeight.integer; - else - chatHeight = TEAMCHAT_HEIGHT; - - if( chatHeight <= 0 || cg_teamChatTime.integer <= 0 ) - { - // team chat disabled, dump into normal chat - cgs.teamChatPos = cgs.teamLastChatPos = 0; - return; - } - - len = 0; - - p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; - *p = 0; - - lastcolor = '7'; - - ls = NULL; - while( *str ) - { - if( len > TEAMCHAT_WIDTH - 1 ) - { - if( ls ) - { - str -= ( p - ls ); - str++; - p -= ( p - ls ); - } - - *p = 0; - - cgs.teamChatMsgTimes[ cgs.teamChatPos % chatHeight ] = cg.time; - - cgs.teamChatPos++; - p = cgs.teamChatMsgs[ cgs.teamChatPos % chatHeight ]; - *p = 0; - *p++ = Q_COLOR_ESCAPE; - *p++ = lastcolor; - len = 0; - ls = NULL; - } - - if( Q_IsColorString( str ) ) - { - *p++ = *str++; - lastcolor = *str; - *p++ = *str++; - continue; - } - - if( *str == ' ' ) - ls = p; - - *p++ = *str++; - len++; - } - *p = 0; - - cgs.teamChatMsgTimes[ cgs.teamChatPos % chatHeight ] = cg.time; - cgs.teamChatPos++; - - if( cgs.teamChatPos - cgs.teamLastChatPos > chatHeight ) - cgs.teamLastChatPos = cgs.teamChatPos - chatHeight; -} - - - -/* =============== CG_MapRestart @@ -905,7 +823,6 @@ static void CG_ServerCommand( void ) Q_strncpyz( text, CG_Argv( 1 ), MAX_SAY_TEXT ); CG_RemoveChatEscapeChar( text ); - CG_AddToTeamChat( text ); CG_Printf( "%s\n", text ); return; } |