]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
strlwr does not exist on Linux
[xonotic/darkplaces.git] / host_cmd.c
index b349af1e11795ce7e6adffb390260c94107a8781..fae72a98624ba40d157eacf316ba7099dcd6ad49 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);
        }
 }
 
@@ -370,6 +369,11 @@ This is sent just before a server changes levels
 */
 void Host_Reconnect_f (void)
 {
+       if (cmd_source == src_command)
+       {
+               Con_Print("reconnect is not valid from the console\n");
+               return;
+       }
        if (Cmd_Argc() != 1)
        {
                Con_Print("reconnect : wait for signon messages again\n");
@@ -1795,7 +1799,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;