]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/darkplaces-src/cl_parse.c
Update the prebuilt engines to latest version of darkplaces. Also put Linux rebrand...
[voretournament/voretournament.git] / misc / source / darkplaces-src / cl_parse.c
index 9e414372afeba4ea282a2578d5baec6c2d157c5e..53bc140c5dea4efaf08a163c8b52721db4479f69 100644 (file)
@@ -1405,6 +1405,15 @@ static void CL_StopDownload(int size, int crc)
                                        {
                                                Con_Printf("Downloaded \"%s\" (%i bytes, %i CRC)\n", name, size, crc);
                                                FS_WriteFile(name, cls.qw_downloadmemory, cls.qw_downloadmemorycursize);
+                                               if(!strcmp(cls.qw_downloadname, csqc_progname.string))
+                                               {
+                                                       if(cls.caughtcsprogsdata)
+                                                               Mem_Free(cls.caughtcsprogsdata);
+                                                       cls.caughtcsprogsdata = (unsigned char *) Mem_Alloc(cls.permanentmempool, cls.qw_downloadmemorycursize);
+                                                       memcpy(cls.caughtcsprogsdata, cls.qw_downloadmemory, cls.qw_downloadmemorycursize);
+                                                       cls.caughtcsprogsdatasize = cls.qw_downloadmemorycursize;
+                                                       Con_DPrintf("Buffered \"%s\"\n", name);
+                                               }
                                        }
                                }
                        }
@@ -2201,7 +2210,7 @@ static void CL_ParseClientdata (void)
                cl.stats[STAT_NAILS] = MSG_ReadByte(&cl_message);
                cl.stats[STAT_ROCKETS] = MSG_ReadByte(&cl_message);
                cl.stats[STAT_CELLS] = MSG_ReadByte(&cl_message);
-               if (gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE || gamemode == GAME_NEXUIZ)
+               if (gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE || gamemode == GAME_QUOTH || gamemode == GAME_NEXUIZ)
                        cl.stats[STAT_ACTIVEWEAPON] = (1<<MSG_ReadByte(&cl_message));
                else
                        cl.stats[STAT_ACTIVEWEAPON] = MSG_ReadByte(&cl_message);
@@ -3664,7 +3673,7 @@ void CL_ParseServerMessage(void)
                                break;
 
                        case qw_svc_chokecount:
-                               i = MSG_ReadByte(&cl_message);
+                               (void) MSG_ReadByte(&cl_message);
                                // FIXME: apply to netgraph
                                //for (j = 0;j < i;j++)
                                //      cl.frames[(cls.netcon->qw.incoming_acknowledged-1-j)&QW_UPDATE_MASK].receivedtime = -2;