diff options
author | M. Kristall <mkpdev@gmail.com> | 2010-02-25 16:18:33 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:27 +0000 |
commit | 8a75ae8f815a7e2067a8ebf19f20b39948d748ab (patch) | |
tree | bac6fca807a8311011991ae9d261c3f3605add34 /src/game/g_client.c | |
parent | 69f3a7fece69a9eee18e74f43b898a333d4969c6 (diff) |
* Refactor emoticon code
* Remove some redundant code
* Make an error non-fatal
* Formatting fixes
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r-- | src/game/g_client.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c index f3426d42..b6f1ab61 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -785,7 +785,7 @@ static qboolean G_IsEmoticon( const char *s, qboolean *escaped ) { for( j = 0; j < level.emoticonCount; j++ ) { - if( !Q_stricmp( emoticon, level.emoticons[ j ] ) ) + if( !Q_stricmp( emoticon, level.emoticons[ j ].name ) ) { *escaped = escape; return qtrue; @@ -1014,16 +1014,16 @@ void ClientUserinfoChanged( int clientNum ) if( strcmp( oldname, newname ) ) { if( client->pers.nameChangeTime && - ( level.time - client->pers.nameChangeTime ) - <= ( g_minNameChangePeriod.value * 1000 ) ) + level.time - client->pers.nameChangeTime <= + g_minNameChangePeriod.value * 1000 ) { trap_SendServerCommand( ent - g_entities, va( "print \"Name change spam protection (g_minNameChangePeriod = %d)\n\"", g_minNameChangePeriod.integer ) ); revertName = qtrue; } - else if( g_maxNameChanges.integer > 0 - && client->pers.nameChanges >= g_maxNameChanges.integer ) + else if( g_maxNameChanges.integer > 0 && + client->pers.nameChanges >= g_maxNameChanges.integer ) { trap_SendServerCommand( ent - g_entities, va( "print \"Maximum name changes reached (g_maxNameChanges = %d)\n\"", @@ -1154,7 +1154,7 @@ void ClientUserinfoChanged( int clientNum ) client->pers.teamInfo = qtrue; else client->pers.teamInfo = qfalse; - + s = Info_ValueForKey( userinfo, "cg_unlagged" ); if( !s[0] || atoi( s ) != 0 ) client->pers.useUnlagged = qtrue; |