summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-10-06 20:31:25 +0400
committerAndrey Nazarov <skuller@skuller.net>2010-10-06 20:31:25 +0400
commitd523f7c99067c582f907f81e40974f97194b337d (patch)
tree07b57f3f8dcc733e014095a4675feadca818f1ce /src
parentd814a4f0b109140062dd4eb4fb3c103e8d2d970c (diff)
List client settings with ‘status s’.
Diffstat (limited to 'src')
-rw-r--r--src/sv_ccmds.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/sv_ccmds.c b/src/sv_ccmds.c
index 6eb611a..78e914a 100644
--- a/src/sv_ccmds.c
+++ b/src/sv_ccmds.c
@@ -567,6 +567,29 @@ static void dump_protocols( void ) {
}
}
+static void dump_settings( void ) {
+ client_t *cl;
+ char opt[8];
+
+ Com_Printf(
+"num name proto options upd fps\n"
+"--- --------------- ----- ------- --- ---\n" );
+
+ opt[6] = ' ';
+ opt[7] = 0;
+ FOR_EACH_CLIENT( cl ) {
+ opt[0] = cl->settings[CLS_NOGUN] ? 'G' : ' ';
+ opt[1] = cl->settings[CLS_NOBLEND] ? 'B' : ' ';
+ opt[2] = cl->settings[CLS_RECORDING] ? 'R' : ' ';
+ opt[3] = cl->settings[CLS_NOGIBS] ? 'I' : ' ';
+ opt[4] = cl->settings[CLS_NOFOOTSTEPS] ? 'F' : ' ';
+ opt[5] = cl->settings[CLS_NOPREDICT] ? 'P' : ' ';
+ Com_Printf( "%3i %-15.15s %5d %s %3d %3d\n",
+ cl->number, cl->name, cl->protocol, opt,
+ cl->settings[CLS_PLAYERUPDATES], cl->settings[CLS_FPS] );
+ }
+}
+
/*
================
SV_Status_f
@@ -592,6 +615,7 @@ static void SV_Status_f( void ) {
case 'd': dump_downloads(); break;
case 'l': dump_lag(); break;
case 'p': dump_protocols(); break;
+ case 's': dump_settings(); break;
default: dump_versions(); break;
}
} else {