]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
Alphabetical order fix
[xonotic/darkplaces.git] / cl_parse.c
index 0ecfb69301d24188bad84db91ff9861f7c468ac9..685233bcdbd8f32bc0059255eb18766ef60347c0 100644 (file)
@@ -270,8 +270,6 @@ static void CL_ParseStartSoundPacket(int largesoundindex)
                        sound_num = MSG_ReadByte(&cl_message);
        }
 
-       channel = CHAN_NET2ENGINE(channel);
-
        MSG_ReadVector(&cl_message, pos, cls.protocol);
 
        if (sound_num < 0 || sound_num >= MAX_SOUNDS)
@@ -1118,9 +1116,9 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                {
                        Con_Printf("Downloading new CSQC code to dlcache/%s.%i.%i\n", csqc_progname.string, csqc_progsize.integer, csqc_progcrc.integer);
                        if(cl_serverextension_download.integer == 2 && FS_HasZlib())
-                               Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "download %s deflate", csqc_progname.string));
+                               CL_ForwardToServer(va(vabuf, sizeof(vabuf), "download %s deflate", csqc_progname.string));
                        else
-                               Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "download %s", csqc_progname.string));
+                               CL_ForwardToServer(va(vabuf, sizeof(vabuf), "download %s", csqc_progname.string));
                        return;
                }
        }
@@ -1199,7 +1197,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                                        cl.loadfinished = true;
                                        // now issue the spawn to move on to signon 2 like normal
                                        if (cls.netcon)
-                                               Cmd_ForwardStringToServer("prespawn");
+                                               CL_ForwardToServer("prespawn");
                                }
                        }
                }
@@ -1269,7 +1267,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                                                cl.loadfinished = true;
                                                // now issue the spawn to move on to signon 2 like normal
                                                if (cls.netcon)
-                                                       Cmd_ForwardStringToServer("prespawn");
+                                                       CL_ForwardToServer("prespawn");
                                        }
                                }
                                aborteddownload = false;
@@ -1287,7 +1285,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                                // regarding the * check: don't try to download submodels
                                if (cl_serverextension_download.integer && cls.netcon && cl.model_name[cl.downloadmodel_current][0] != '*' && !sv.active)
                                {
-                                       Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "download %s", cl.model_name[cl.downloadmodel_current]));
+                                       CL_ForwardToServer(va(vabuf, sizeof(vabuf), "download %s", cl.model_name[cl.downloadmodel_current]));
                                        // we'll try loading again when the download finishes
                                        return;
                                }
@@ -1311,7 +1309,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                                        cl.loadfinished = true;
                                        // now issue the spawn to move on to signon 2 like normal
                                        if (cls.netcon)
-                                               Cmd_ForwardStringToServer("prespawn");
+                                               CL_ForwardToServer("prespawn");
                                }
                        }
                }
@@ -1340,7 +1338,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
                                Con_Printf("Sound %s not found\n", soundname);
                                if (cl_serverextension_download.integer && cls.netcon && !sv.active)
                                {
-                                       Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "download %s", soundname));
+                                       CL_ForwardToServer(va(vabuf, sizeof(vabuf), "download %s", soundname));
                                        // we'll try loading again when the download finishes
                                        return;
                                }
@@ -1362,7 +1360,7 @@ static void CL_BeginDownloads(qboolean aborteddownload)
 
                // now issue the spawn to move on to signon 2 like normal
                if (cls.netcon)
-                       Cmd_ForwardStringToServer("prespawn");
+                       CL_ForwardToServer("prespawn");
        }
 }
 
@@ -1539,7 +1537,7 @@ static void CL_DownloadBegin_f(cmd_state_t *cmd)
                // check further encodings here
        }
 
-       Cmd_ForwardStringToServer("sv_startdownload");
+       CL_ForwardToServer("sv_startdownload");
 }
 
 static void CL_StopDownload_f(cmd_state_t *cmd)
@@ -1564,37 +1562,37 @@ static void CL_DownloadFinished_f(cmd_state_t *cmd)
        CL_BeginDownloads(false);
 }
 
-extern cvar_t topcolor;
-extern cvar_t bottomcolor;
+extern cvar_t cl_topcolor;
+extern cvar_t cl_bottomcolor;
 static void CL_SendPlayerInfo(void)
 {
        char vabuf[1024];
        MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "name \"%s\"", name.string));
+       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "name \"%s\"", cl_name.string));
 
        MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", topcolor.integer, bottomcolor.integer));
+       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", cl_topcolor.integer, cl_bottomcolor.integer));
 
        MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate %i", rate.integer));
+       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate %i", cl_rate.integer));
 
        MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate_burstsize %i", rate_burstsize.integer));
+       MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate_burstsize %i", cl_rate_burstsize.integer));
 
-       if (pmodel.integer)
+       if (cl_pmodel.integer)
        {
                MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-               MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "pmodel %i", pmodel.integer));
+               MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "pmodel %i", cl_pmodel.integer));
        }
-       if (*playermodel.string)
+       if (*cl_playermodel.string)
        {
                MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-               MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playermodel %s", playermodel.string));
+               MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playermodel %s", cl_playermodel.string));
        }
-       if (*playerskin.string)
+       if (*cl_playerskin.string)
        {
                MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
-               MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playerskin %s", playerskin.string));
+               MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playerskin %s", cl_playerskin.string));
        }
 }