]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
Improve windows manifest indenting
[xonotic/darkplaces.git] / cl_parse.c
index a78b67f61921e0c429836e0d195d99784abaec54..bd402e2fc6fc2c5818e6371f312a8e4b57c468aa 100644 (file)
@@ -499,7 +499,7 @@ static void CL_SetupWorldModel(void)
        World_Start(&cl.world);
 
        // load or reload .loc file for team chat messages
-       CL_Locs_Reload_f(&cmd_client);
+       CL_Locs_Reload_f(cmd_client);
 
        // make sure we send enough keepalives
        CL_KeepaliveMessage(false);
@@ -939,7 +939,7 @@ void QW_CL_StartUpload(unsigned char *data, int size)
                return;
 
        // abort existing upload if in progress
-       QW_CL_StopUpload_f(&cmd_client);
+       QW_CL_StopUpload_f(cmd_client);
 
        Con_DPrintf("Starting upload of %d bytes...\n", size);
 
@@ -948,7 +948,7 @@ void QW_CL_StartUpload(unsigned char *data, int size)
        cls.qw_uploadsize = size;
        cls.qw_uploadpos = 0;
 
-       QW_CL_NextUpload_f(&cmd_client);
+       QW_CL_NextUpload_f(cmd_client);
 }
 
 #if 0
@@ -1618,7 +1618,7 @@ static void CL_SignonReply (void)
                        // execute cl_begindownloads next frame
                        // (after any commands added by svc_stufftext have been executed)
                        // when done with downloads the "prespawn" will be sent
-                       Cbuf_AddText(&cmd_client, "\ncl_begindownloads\n");
+                       Cbuf_AddText(cmd_client, "\ncl_begindownloads\n");
 
                        //MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
                        //MSG_WriteString (&cls.netcon->message, "prespawn");
@@ -1919,7 +1919,7 @@ static void CL_ParseServerInfo (void)
                        if (cls.demorecording)
                        {
                                // finish the previous level's demo file
-                               CL_Stop_f(&cmd_client);
+                               CL_Stop_f(cmd_client);
                        }
 
                        // start a new demo file
@@ -1953,7 +1953,7 @@ static void CL_ParseServerInfo (void)
 
 void CL_ValidateState(entity_state_t *s)
 {
-       dp_model_t *model;
+       model_t *model;
 
        if (!s->active)
                return;
@@ -2300,7 +2300,7 @@ static void CL_ParseStaticSound (int large)
        int                     sound_num, vol, atten;
 
        MSG_ReadVector(&cl_message, org, cls.protocol);
-       if (large || cls.protocol == PROTOCOL_NEHAHRABJP2)
+       if (large)
                sound_num = (unsigned short) MSG_ReadShort(&cl_message);
        else
                sound_num = MSG_ReadByte(&cl_message);
@@ -2345,7 +2345,7 @@ static void CL_ParseEffect2 (void)
        CL_Effect(org, CL_GetModelByIndex(modelindex), startframe, framecount, framerate);
 }
 
-void CL_NewBeam (int ent, vec3_t start, vec3_t end, dp_model_t *m, int lightning)
+void CL_NewBeam (int ent, vec3_t start, vec3_t end, model_t *m, int lightning)
 {
        int i;
        beam_t *b = NULL;
@@ -2384,7 +2384,7 @@ void CL_NewBeam (int ent, vec3_t start, vec3_t end, dp_model_t *m, int lightning
                Con_DPrint("beam list overflow!\n");
 }
 
-static void CL_ParseBeam (dp_model_t *m, int lightning)
+static void CL_ParseBeam (model_t *m, int lightning)
 {
        int ent;
        vec3_t start, end;
@@ -3491,11 +3491,13 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_disconnect:
-                               Con_Printf("Server disconnected\n");
                                if (cls.demonum != -1)
                                        CL_NextDemo();
                                else
+                               {
+                                       Con_Printf("Server disconnected\n");
                                        CL_Disconnect();
+                               }
                                return;
 
                        case qw_svc_print:
@@ -3658,7 +3660,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_sellscreen:
-                               Cmd_ExecuteString(&cmd_client, "help", src_local, true);
+                               Cmd_ExecuteString(cmd_client, "help", src_local, true);
                                break;
 
                        case qw_svc_smallkick:
@@ -3872,11 +3874,13 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_disconnect:
-                               Con_Printf ("Server disconnected\n");
                                if (cls.demonum != -1)
                                        CL_NextDemo ();
                                else
+                               {
+                                       Con_Printf ("Server disconnected\n");
                                        CL_Disconnect ();
+                               }
                                break;
 
                        case svc_print:
@@ -3976,7 +3980,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_sound:
-                               CL_ParseStartSoundPacket(false);
+                               CL_ParseStartSoundPacket(cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 ? true : false);
                                break;
 
                        case svc_precache:
@@ -3994,7 +3998,7 @@ void CL_ParseServerMessage(void)
                                        {
                                                if (i >= 1 && i < MAX_MODELS)
                                                {
-                                                       dp_model_t *model = Mod_ForName(s, false, false, s[0] == '*' ? cl.model_name[1] : NULL);
+                                                       model_t *model = Mod_ForName(s, false, false, s[0] == '*' ? cl.model_name[1] : NULL);
                                                        if (!model)
                                                                Con_DPrintf("svc_precache: Mod_ForName(\"%s\") failed\n", s);
                                                        cl.model_precache[i] = model;
@@ -4125,7 +4129,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_spawnstaticsound:
-                               CL_ParseStaticSound (false);
+                               CL_ParseStaticSound (cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 ? true : false);
                                break;
 
                        case svc_spawnstaticsound2:
@@ -4165,7 +4169,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_sellscreen:
-                               Cmd_ExecuteString(&cmd_client, "help", src_local, true);
+                               Cmd_ExecuteString(cmd_client, "help", src_local, true);
                                break;
                        case svc_hidelmp:
                                if (gamemode == GAME_TENEBRAE)
@@ -4268,7 +4272,7 @@ void CL_Parse_DumpPacket(void)
 void CL_Parse_ErrorCleanUp(void)
 {
        CL_StopDownload(0, 0);
-       QW_CL_StopUpload_f(&cmd_client);
+       QW_CL_StopUpload_f(cmd_client);
 }
 
 void CL_Parse_Init(void)