diff options
author | M. Kristall <mkpdev@gmail.com> | 2011-02-24 07:00:48 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:18:02 +0000 |
commit | bb05f256529f7df15e21168fd8fe79f439f22ca9 (patch) | |
tree | d797c7eac678b7356326b3f3596c5e4bcffa942b /src | |
parent | 93d9c093f4ff092675e5557bc56aedd72187ae27 (diff) |
* Fix a bug causing duplicate entries in namelog
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 4 | ||||
-rw-r--r-- | src/game/g_client.c | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 007b13fc..979c92f9 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -2655,10 +2655,10 @@ static void namelog_out( void *namelog, char *str ) if( n->slot > -1 ) { - l = Q_snprintf( p, l2, "^3%-2d", n->slot ); + scolor = S_COLOR_YELLOW; + l = Q_snprintf( p, l2, "%s%-2d", scolor, n->slot ); p += l; l2 -= l; - scolor = S_COLOR_YELLOW; } else { diff --git a/src/game/g_client.c b/src/game/g_client.c index 173d2976..39854623 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1206,6 +1206,11 @@ char *ClientConnect( int clientNum, qboolean firstTime ) ent = &g_entities[ clientNum ]; client = &level.clients[ clientNum ]; + + // ignore if client already connected + if( client->pers.connected != CON_DISCONNECTED ) + return NULL; + ent->client = client; memset( client, 0, sizeof( *client ) ); @@ -1319,8 +1324,8 @@ void ClientBegin( int clientNum ) client = level.clients + clientNum; - // ignore if client allready entered the game - if( client->pers.connected == CON_CONNECTED ) + // ignore if client already entered the game + if( client->pers.connected != CON_CONNECTING ) return; if( ent->r.linked ) |