]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
Reverting the DP_MOVETYPEWALK_NONCLIENTS commit.
[xonotic/darkplaces.git] / host_cmd.c
index 645a6a18ecb5053f89a39d75af19ca7f16f1a6d8..7ded7c4787ef1f0bd4e1b835564f0d45f9d6e61d 100644 (file)
@@ -671,6 +671,7 @@ Host_Name_f
 cvar_t cl_name = {CVAR_SAVE, "_cl_name", "player"};
 void Host_Name_f (void)
 {
+       int i, j;
        char newName[sizeof(host_client->name)];
 
        if (Cmd_Argc () == 1)
@@ -684,6 +685,11 @@ void Host_Name_f (void)
        else
                strlcpy (newName, Cmd_Args(), sizeof (newName));
 
+       for (i = 0, j = 0;newName[i];i++)
+               if (newName[i] != '\r' && newName[i] != '\n')
+                       newName[j++] = newName[i];
+       newName[j] = 0;
+
        if (cmd_source == src_command)
        {
                Cvar_Set ("_cl_name", newName);
@@ -1109,6 +1115,8 @@ void Host_Spawn_f (void)
                return;
        }
 
+       host_client->nametime = 0;
+
        // LordHavoc: moved this above the QC calls at FrikaC's request
        // send all current names, colors, and frag counts
        SZ_Clear (&host_client->message);