diff options
author | enneract <trem.redman@gmail.com> | 2014-12-21 14:17:45 +0100 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-12-21 14:17:45 +0100 |
commit | 532ef8f6d132494203caecc8b8007f741d2c6759 (patch) | |
tree | 444ae9b6f325fcc1d2ddc39504b20d42beaf01da /src/game | |
parent | 89c52da526ea245d79184e373bcc259e9a6b0e9d (diff) |
Fix /stats displaying namelog data.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index c29d67e..eda8420 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -4385,6 +4385,7 @@ qboolean G_admin_stats( gentity_t *ent ) gentity_t *targ; int i, j; qboolean header = qfalse; + char err[ MAX_STRING_CHARS ]; const static char *cswNames[ ] = { #define CSW(a,b,c,d) c @@ -4395,18 +4396,17 @@ qboolean G_admin_stats( gentity_t *ent ) if( trap_Argc( ) > 1 ) { char name[ MAX_NAME_LENGTH ]; - namelog_t *vic; + int pid; trap_Argv( 1, name, sizeof( name ) ); - if( !( vic = G_NamelogFromString( ent, name ) ) || - vic->slot <= -1 ) + if( ( pid = G_ClientNumberFromString( name, err, sizeof( err ) ) ) == -1 ) { - ADMP( "^3stats: ^7no match\n" ); + ADMP( va( "^3stats: ^7%s", err ) ); return qfalse; } - targ = g_entities + vic->slot; + targ = g_entities + pid; } else { |