X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=d7432e0c772d56c74c4d967dab562b6c4c629418;hb=b0bb9e3b28e6dc0620f57c3cbe1abdd35b3c5e72;hp=8629ba125f5a2e710b5c052b2c5e1c5d8c0e6669;hpb=db73b7b1279efb1d003c19fa8e9b6fd45db4decf;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index 8629ba12..d7432e0c 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -354,7 +354,7 @@ void CL_ParseServerInfo (void) cl.maxclients = MSG_ReadByte (); if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD) { - Con_Printf("Bad maxclients (%u) from server\n", cl.maxclients); + Host_Error("Bad maxclients (%u) from server\n", cl.maxclients); return; } Mem_EmptyPool(cl_scores_mempool); @@ -374,6 +374,11 @@ void CL_ParseServerInfo (void) // check memory integrity Mem_CheckSentinelsGlobal(); + S_StopAllSounds(); + // if server is active, we already began a loading plaque + if (!sv.active) + SCR_BeginLoadingPlaque(); + // disable until we get textures for it R_ResetSkyBox(); @@ -436,7 +441,7 @@ void CL_ParseServerInfo (void) { CL_KeepaliveMessage(); - // Don't lock the sfx here, S_ServerSounds already did that + // Don't lock the sfx here, S_ServerSounds already did that cl.sound_precache[i] = S_PrecacheSound (parse_sound_precache[i], true, false); } @@ -602,7 +607,10 @@ void CL_ParseClientdata (int bits) { int i, j; + VectorCopy (cl.mpunchangle[0], cl.mpunchangle[1]); + VectorCopy (cl.mpunchvector[0], cl.mpunchvector[1]); VectorCopy (cl.mvelocity[0], cl.mvelocity[1]); + cl.mviewzoom[1] = cl.mviewzoom[0]; if (cl.protocol != PROTOCOL_DARKPLACES6) { @@ -611,15 +619,16 @@ void CL_ParseClientdata (int bits) cl.stats[STAT_VIEWZOOM] = 255; } cl.idealpitch = 0; - cl.punchangle[0] = 0; - cl.punchangle[1] = 0; - cl.punchangle[2] = 0; - cl.punchvector[0] = 0; - cl.punchvector[1] = 0; - cl.punchvector[2] = 0; + cl.mpunchangle[0][0] = 0; + cl.mpunchangle[0][1] = 0; + cl.mpunchangle[0][2] = 0; + cl.mpunchvector[0][0] = 0; + cl.mpunchvector[0][1] = 0; + cl.mpunchvector[0][2] = 0; cl.mvelocity[0][0] = 0; cl.mvelocity[0][1] = 0; cl.mvelocity[0][2] = 0; + cl.mviewzoom[0] = 1; bits &= 0xFFFF; if (bits & SU_EXTEND1) @@ -638,18 +647,18 @@ void CL_ParseClientdata (int bits) if (bits & (SU_PUNCH1< 0) { - snprintf (temp, sizeof (temp), "%3i:%s ", cmdlog[i], cmdlogname[i]); + dpsnprintf (temp, sizeof (temp), "%3i:%s ", cmdlog[i], cmdlogname[i]); strlcat (description, temp, sizeof (description)); count--; i++; @@ -1607,7 +1614,9 @@ void CL_ParseServerMessage(void) case svc_signonnum: i = MSG_ReadByte (); - if (i <= cls.signon) + // LordHavoc: it's rude to kick off the client if they missed the + // reconnect somehow, so allow signon 1 even if at signon 1 + if (i <= cls.signon && i != 1) Host_Error ("Received signon %i when at %i", i, cls.signon); cls.signon = i; CL_SignonReply (); @@ -1758,3 +1767,8 @@ void CL_Parse_Init(void) Cvar_SetValue("demo_nehahra", 1); Cvar_RegisterVariable(&developer_networkentities); } + +void CL_Parse_Shutdown(void) +{ + Mem_FreePool (&cl_scores_mempool); +}