From 8a75ae8f815a7e2067a8ebf19f20b39948d748ab Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Thu, 25 Feb 2010 16:18:33 +0000 Subject: * Refactor emoticon code * Remove some redundant code * Make an error non-fatal * Formatting fixes --- src/cgame/cg_main.c | 8 ++++---- src/cgame/cg_servercmds.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index c7b69852..dd08e324 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1698,16 +1698,16 @@ void CG_AssetCache( void ) if( cg_emoticons.integer ) { cgDC.Assets.emoticonCount = BG_LoadEmoticons( cgDC.Assets.emoticons, - cgDC.Assets.emoticonWidths ); + MAX_EMOTICONS ); } else cgDC.Assets.emoticonCount = 0; for( i = 0; i < cgDC.Assets.emoticonCount; i++ ) { - cgDC.Assets.emoticonShaders[ i ] = trap_R_RegisterShaderNoMip( - va( "emoticons/%s_%dx1.tga", cgDC.Assets.emoticons[ i ], - cgDC.Assets.emoticonWidths[ i ] ) ); + cgDC.Assets.emoticons[ i ].shader = trap_R_RegisterShaderNoMip( + va( "emoticons/%s_%dx1.tga", cgDC.Assets.emoticons[ i ].name, + cgDC.Assets.emoticons[ i ].width ) ); } } diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 7af79e9c..f0fb60a6 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -91,7 +91,7 @@ static void CG_ParseTeamInfo( void ) client = atoi( CG_Argv( i * 5 + 1 ) ); if( client < 0 || client >= MAX_CLIENTS ) { - CG_Error( "CG_ParseTeamInfo: bad client number: %d", client ); + CG_Printf( "[skipnotify]CG_ParseTeamInfo: bad client number: %d", client ); return; } -- cgit