]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
use checkdisk flag on model loading after ingame download, this should
[xonotic/darkplaces.git] / cl_parse.c
index 18f00dcfe48f8b3285ea5420ecfa97ae53dbf04f..dcde8eb1607e060f1bd748eb06eb6076f8c71152 100644 (file)
@@ -194,8 +194,8 @@ static void QW_CL_NextUpload(void);
 void QW_CL_StartUpload(unsigned char *data, int size);
 //static qboolean QW_CL_IsUploading(void);
 static void QW_CL_StopUpload(void);
-void CL_VM_UpdateIntermissionState(int intermission);
-qboolean CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos);
+extern void CL_VM_UpdateIntermissionState(int intermission);
+extern qboolean CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed);
 
 /*
 ==================
@@ -211,6 +211,7 @@ void CL_ParseStartSoundPacket(int largesoundindex)
        int     field_mask;
        float   attenuation;
        float   speed;
+       int             fflags = CHANNELFLAG_NONE;
 
        if (cls.protocol == PROTOCOL_QUAKEWORLD)
        {
@@ -289,8 +290,8 @@ void CL_ParseStartSoundPacket(int largesoundindex)
        if (ent >= cl.max_entities)
                CL_ExpandEntities(ent);
 
-       if( !CL_VM_Event_Sound(sound_num, volume / 255.0f, channel, attenuation, ent, pos) )
-               S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0f, attenuation);
+       if( !CL_VM_Event_Sound(sound_num, volume / 255.0f, channel, attenuation, ent, pos, fflags, speed) )
+               S_StartSound_StartPosition_Flags (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0f, attenuation, 0, fflags, speed);
 }
 
 /*
@@ -305,6 +306,7 @@ so the server doesn't disconnect.
 static unsigned char olddata[NET_MAXMESSAGE];
 void CL_KeepaliveMessage (qboolean readmessages)
 {
+       static qboolean recursive = false;
        float time;
        static double nextmsg = -1;
        static double nextupdate = -1;
@@ -315,18 +317,29 @@ void CL_KeepaliveMessage (qboolean readmessages)
        qboolean oldbadread;
        sizebuf_t old;
 
-       if(cls.state != ca_dedicated)
+       qboolean thisrecursive;
+
+       thisrecursive = recursive;
+       recursive = true;
+
+       if(!thisrecursive)
        {
-               if((time = Sys_DoubleTime()) >= nextupdate)
+               if(cls.state != ca_dedicated)
                {
-                       SCR_UpdateLoadingScreenIfShown();
-                       nextupdate = time + 2;
+                       if((time = Sys_DoubleTime()) >= nextupdate)
+                       {
+                               SCR_UpdateLoadingScreenIfShown();
+                               nextupdate = time + 2;
+                       }
                }
        }
 
        // no need if server is local and definitely not if this is a demo
        if (!cls.netcon || cls.protocol == PROTOCOL_QUAKEWORLD || cls.signon >= SIGNONS)
+       {
+               recursive = thisrecursive;
                return;
+       }
 
        if (readmessages)
        {
@@ -366,6 +379,8 @@ void CL_KeepaliveMessage (qboolean readmessages)
                MSG_WriteChar(&msg, clc_nop);
                NetConn_SendUnreliableMessage(cls.netcon, &msg, cls.protocol, 10000, false);
        }
+
+       recursive = thisrecursive;
 }
 
 void CL_ParseEntityLump(char *entdata)
@@ -1266,7 +1281,7 @@ void CL_BeginDownloads(qboolean aborteddownload)
                                Mod_FreeQ3Shaders();
                        }
 
-                       cl.model_precache[cl.downloadmodel_current] = Mod_ForName(cl.model_name[cl.downloadmodel_current], false, false, cl.model_name[cl.downloadmodel_current][0] == '*' ? cl.model_name[1] : NULL);
+                       cl.model_precache[cl.downloadmodel_current] = Mod_ForName(cl.model_name[cl.downloadmodel_current], false, true, cl.model_name[cl.downloadmodel_current][0] == '*' ? cl.model_name[1] : NULL);
                        if (cl.downloadmodel_current == 1)
                        {
                                // we now have the worldmodel so we can set up the game world
@@ -3603,7 +3618,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_sellscreen:
-                               Cmd_ExecuteString ("help", src_command);
+                               Cmd_ExecuteString ("help", src_command, true);
                                break;
 
                        case qw_svc_smallkick:
@@ -4109,7 +4124,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case svc_sellscreen:
-                               Cmd_ExecuteString ("help", src_command);
+                               Cmd_ExecuteString ("help", src_command, true);
                                break;
                        case svc_hidelmp:
                                if (gamemode == GAME_TENEBRAE)