]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
added -demo and -demolooponly options. -demo starts the wanted demo and then shuts...
[xonotic/darkplaces.git] / host_cmd.c
index b349af1e11795ce7e6adffb390260c94107a8781..b88d27bcfd993d21693465b0e4a22ca5ce93ae2b 100644 (file)
@@ -209,8 +209,7 @@ Host_Ping_f
 */
 void Host_Ping_f (void)
 {
-       int             i, j;
-       float   total;
+       int             i;
        client_t        *client;
 
        if (cmd_source == src_command)
@@ -224,7 +223,7 @@ void Host_Ping_f (void)
        {
                if (!client->active)
                        continue;
-               SV_ClientPrintf("%4i %s\n", (int)(client->ping*1000), client->name);
+               SV_ClientPrintf("%4i %s\n", (int)floor(client->ping*1000+0.5), client->name);
        }
 }
 
@@ -1795,7 +1794,7 @@ void Host_Startdemos_f (void)
 {
        int             i, c;
 
-       if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
+       if (cls.state == ca_dedicated || COM_CheckParm("-listen") || COM_CheckParm("-benchmark") || COM_CheckParm("-demo") || COM_CheckParm("-demolooponly"))
                return;
 
        c = Cmd_Argc() - 1;