X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=0cb0133e5fbc74f55f34adb4bef490bebdc7b225;hb=9e2b58ca29f82fcdcb57ea0e7159e7d604ce7f4a;hp=e0c102e5762454b93cd3d34144fd432e96b62942;hpb=280eaa59ec9f7f813d00b6311f251ee397311074;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index e0c102e5..0cb0133e 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -245,7 +245,7 @@ void CL_ParseStartSoundPacket(int largesoundindex) channel &= 7; } - if (largesoundindex || field_mask & SND_LARGESOUND) + if (largesoundindex || (field_mask & SND_LARGESOUND) || cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3) sound_num = (unsigned short) MSG_ReadShort (); else sound_num = MSG_ReadByte (); @@ -336,13 +336,13 @@ void CL_ParseEntityLump(char *entdata) data = entdata; if (!data) return; - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, false)) return; // error if (com_token[0] != '{') return; // error while (1) { - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, false)) return; // error if (com_token[0] == '}') break; // end of worldspawn @@ -352,7 +352,7 @@ void CL_ParseEntityLump(char *entdata) strlcpy (key, com_token, sizeof (key)); while (key[strlen(key)-1] == ' ') // remove trailing spaces key[strlen(key)-1] = 0; - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, false)) return; // error strlcpy (value, com_token, sizeof (value)); if (!strcmp("sky", key)) @@ -362,7 +362,11 @@ void CL_ParseEntityLump(char *entdata) else if (!strcmp("qlsky", key)) // non-standard, introduced by QuakeLives (EEK) R_SetSkyBox(value); else if (!strcmp("fog", key)) - sscanf(value, "%f %f %f %f", &r_refdef.fog_density, &r_refdef.fog_red, &r_refdef.fog_green, &r_refdef.fog_blue); + { + r_refdef.fog_start = 0; + r_refdef.fog_end = 1000000000; + sscanf(value, "%f %f %f %f %f %f", &r_refdef.fog_density, &r_refdef.fog_red, &r_refdef.fog_green, &r_refdef.fog_blue, &r_refdef.fog_start, &r_refdef.fog_end); + } else if (!strcmp("fog_density", key)) r_refdef.fog_density = atof(value); else if (!strcmp("fog_red", key)) @@ -1380,6 +1384,8 @@ static void CL_SignonReply (void) case 4: Con_ClearNotify(); + if (COM_CheckParm("-profilegameonly")) + Sys_AllowProfiling(true); break; } } @@ -1738,6 +1744,11 @@ void CL_ParseBaseline (entity_t *ent, int large) ent->state_baseline.modelindex = (unsigned short) MSG_ReadShort (); ent->state_baseline.frame = (unsigned short) MSG_ReadShort (); } + else if (cls.protocol == PROTOCOL_NEHAHRABJP || cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3) + { + ent->state_baseline.modelindex = (unsigned short) MSG_ReadShort (); + ent->state_baseline.frame = MSG_ReadByte (); + } else { ent->state_baseline.modelindex = MSG_ReadByte (); @@ -1770,7 +1781,7 @@ void CL_ParseClientdata (void) VectorCopy (cl.mvelocity[0], cl.mvelocity[1]); cl.mviewzoom[1] = cl.mviewzoom[0]; - if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5) + 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 || cls.protocol == PROTOCOL_DARKPLACES5) { cl.stats[STAT_VIEWHEIGHT] = DEFAULT_VIEWHEIGHT; cl.stats[STAT_ITEMS] = 0; @@ -1804,7 +1815,7 @@ void CL_ParseClientdata (void) { if (bits & (SU_PUNCH1<