]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
GFX : Adjusted gfx/net.jpg size and orientation
[xonotic/darkplaces.git] / cl_parse.c
index 379c6ec6efed807426e4caecdebb026754fb2162..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
@@ -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);
@@ -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:
@@ -3703,9 +3705,7 @@ void CL_ParseServerMessage(void)
                                        for (i = 1;i < cl.maxclients;i++)
                                                cl.entities_active[i] = false;
                                }
-#ifndef SERVERONLY
                                EntityStateQW_ReadPlayerUpdate();
-#endif
                                break;
 
                        case qw_svc_nails:
@@ -3728,9 +3728,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_packetentities:
-#ifndef SERVERONLY
                                EntityFrameQW_CL_ReadFrame(false);
-#endif
                                // first update is the final signon stage
                                if (cls.signon == SIGNONS - 1)
                                {
@@ -3740,9 +3738,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_deltapacketentities:
-#ifndef SERVERONLY
                                EntityFrameQW_CL_ReadFrame(true);
-#endif
                                // first update is the final signon stage
                                if (cls.signon == SIGNONS - 1)
                                {
@@ -3813,9 +3809,7 @@ void CL_ParseServerMessage(void)
                                        cls.signon = SIGNONS;
                                        CL_SignonReply ();
                                }
-#ifndef SERVERONLY
                                EntityFrameQuake_ReadEntity (cmd&127);
-#endif
                                continue;
                        }
 
@@ -3880,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:
@@ -3984,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:
@@ -4133,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:
@@ -4173,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)
@@ -4216,14 +4212,12 @@ void CL_ParseServerMessage(void)
                                        cls.signon = SIGNONS;
                                        CL_SignonReply ();
                                }
-#ifndef SERVERONLY
                                if (cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3)
                                        EntityFrame_CL_ReadFrame();
                                else if (cls.protocol == PROTOCOL_DARKPLACES4)
                                        EntityFrame4_CL_ReadFrame();
                                else
                                        EntityFrame5_CL_ReadFrame();
-#endif
                                break;
                        case svc_csqcentities:
                                CSQC_ReadEntities();
@@ -4248,9 +4242,8 @@ void CL_ParseServerMessage(void)
        if (cls.signon == SIGNONS)
                CL_UpdateItemsAndWeapon();
 //     R_TimeReport("UpdateItems");
-#ifndef SERVERONLY
+
        EntityFrameQuake_ISeeDeadEntities();
-#endif
 //     R_TimeReport("ISeeDeadEntities");
 
        CL_UpdateMoveVars();
@@ -4279,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)