X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=c16b8eaae4d45bc3a644e3c824c6f4f6a6774200;hb=c1d4a643adf18663ebfa28124029bc2caab52205;hp=55e1a79a50410d36793ffaba9c3db78f2838639e;hpb=4e863679a571cdf161e7e9a047dc0351e0a5eea6;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index 55e1a79a..c16b8eaa 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -167,7 +167,7 @@ cvar_t cl_worldname = {CVAR_READONLY, "cl_worldname", "", "name of current world cvar_t cl_worldnamenoextension = {CVAR_READONLY, "cl_worldnamenoextension", "", "name of current worldmodel without extension"}; cvar_t cl_worldbasename = {CVAR_READONLY, "cl_worldbasename", "", "name of current worldmodel without maps/ prefix or extension"}; -cvar_t developer_networkentities = {0, "developer_networkentities", "0", "prints received entities, value is 0-4 (higher for more info)"}; +cvar_t developer_networkentities = {0, "developer_networkentities", "0", "prints received entities, value is 0-10 (higher for more info, 10 being the most verbose)"}; cvar_t cl_gameplayfix_soundsmovewithentities = {0, "cl_gameplayfix_soundsmovewithentities", "1", "causes sounds made by lifts, players, projectiles, and any other entities, to move with the entity, so for example a rocket noise follows the rocket rather than staying at the starting position"}; cvar_t cl_sound_wizardhit = {0, "cl_sound_wizardhit", "wizard/hit.wav", "sound to play during TE_WIZSPIKE (empty cvar disables sound)"}; cvar_t cl_sound_hknighthit = {0, "cl_sound_hknighthit", "hknight/hit.wav", "sound to play during TE_KNIGHTSPIKE (empty cvar disables sound)"}; @@ -368,7 +368,7 @@ void CL_KeepaliveMessage (qboolean readmessages) msg.data = buf; msg.maxsize = sizeof(buf); MSG_WriteChar(&msg, clc_nop); - NetConn_SendUnreliableMessage(cls.netcon, &msg, cls.protocol, 10000, false); + NetConn_SendUnreliableMessage(cls.netcon, &msg, cls.protocol, 10000, 0, false); } recursive = thisrecursive; @@ -1119,7 +1119,7 @@ static void CL_BeginDownloads(qboolean aborteddownload) + cl.loadsound_total * LOADPROGRESSWEIGHT_SOUND ) ); - SCR_BeginLoadingPlaque(); + SCR_BeginLoadingPlaque(false); } for (;cl.loadmodel_current < cl.loadmodel_total;cl.loadmodel_current++) { @@ -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); + } } } } @@ -1544,6 +1553,9 @@ static void CL_SendPlayerInfo(void) MSG_WriteByte (&cls.netcon->message, clc_stringcmd); 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", cl_rate_burstsize.integer)); + if (cl_pmodel.integer) { MSG_WriteByte (&cls.netcon->message, clc_stringcmd); @@ -1651,7 +1663,7 @@ static void CL_ParseServerInfo (void) // if server is active, we already began a loading plaque if (!sv.active) { - SCR_BeginLoadingPlaque(); + SCR_BeginLoadingPlaque(false); S_StopAllSounds(); // free q3 shaders so that any newly downloaded shaders will be active Mod_FreeQ3Shaders(); @@ -2187,7 +2199,7 @@ static void CL_ParseClientdata (void) cl.stats[STAT_CELLS] = MSG_ReadShort(&cl_message); cl.stats[STAT_ACTIVEWEAPON] = (unsigned short) MSG_ReadShort(&cl_message); } - else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_NEHAHRABJP || cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 || cls.protocol == PROTOCOL_NEHAHRABJP || cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4) + else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_NEHAHRABJP || cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4) { cl.stats[STAT_WEAPONFRAME] = (bits & SU_WEAPONFRAME) ? MSG_ReadByte(&cl_message) : 0; cl.stats[STAT_ARMOR] = (bits & SU_ARMOR) ? MSG_ReadByte(&cl_message) : 0; @@ -2201,7 +2213,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<qw.incoming_acknowledged-1-j)&QW_UPDATE_MASK].receivedtime = -2;