]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
Adding Sys_GetClipboardData to the SDL driver.
[xonotic/darkplaces.git] / cl_parse.c
index 1db4e0a6b4d35c718064946eecb1aef539432c7d..fae79068ecc4c8a92c934b70b427fd6cdbcba5a8 100644 (file)
@@ -411,7 +411,7 @@ void CL_ParseServerInfo (void)
        for (i = 1;i < numsounds;i++)
        {
                CL_KeepaliveMessage();
-               S_TouchSound(parse_sound_precache[i]);
+               S_TouchSound(parse_sound_precache[i], true);
        }
        S_PurgeUnused();
 
@@ -435,7 +435,7 @@ void CL_ParseServerInfo (void)
        for (i=1 ; i<numsounds ; i++)
        {
                CL_KeepaliveMessage();
-               cl.sound_precache[i] = S_PrecacheSound(parse_sound_precache[i], true);
+               cl.sound_precache[i] = S_PrecacheSound(parse_sound_precache[i], true, true);
        }
 
        // local state
@@ -476,7 +476,10 @@ void CL_ValidateState(entity_state_t *s)
 
        // colormap is client index + 1
        if (s->colormap > cl.maxclients)
-               Host_Error ("CL_ValidateState: colormap (%i) > cl.maxclients (%i)", s->colormap, cl.maxclients);
+       {
+               Con_DPrintf("CL_ValidateState: colormap (%i) > cl.maxclients (%i)", s->colormap, cl.maxclients);
+               s->colormap = 0;
+       }
 
        model = cl.model_precache[s->modelindex];
        Mod_CheckLoaded(model);
@@ -957,13 +960,13 @@ CL_ParseTEnt
 */
 void CL_InitTEnts (void)
 {
-       cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav", false);
-       cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav", false);
-       cl_sfx_tink1 = S_PrecacheSound ("weapons/tink1.wav", false);
-       cl_sfx_ric1 = S_PrecacheSound ("weapons/ric1.wav", false);
-       cl_sfx_ric2 = S_PrecacheSound ("weapons/ric2.wav", false);
-       cl_sfx_ric3 = S_PrecacheSound ("weapons/ric3.wav", false);
-       cl_sfx_r_exp3 = S_PrecacheSound ("weapons/r_exp3.wav", false);
+       cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav", false, true);
+       cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav", false, true);
+       cl_sfx_tink1 = S_PrecacheSound ("weapons/tink1.wav", false, true);
+       cl_sfx_ric1 = S_PrecacheSound ("weapons/ric1.wav", false, true);
+       cl_sfx_ric2 = S_PrecacheSound ("weapons/ric2.wav", false, true);
+       cl_sfx_ric3 = S_PrecacheSound ("weapons/ric3.wav", false, true);
+       cl_sfx_r_exp3 = S_PrecacheSound ("weapons/r_exp3.wav", false, true);
 }
 
 void CL_ParseBeam (model_t *m, int lightning)
@@ -1226,7 +1229,7 @@ void CL_ParseTempEntity(void)
                CL_ParticleExplosion(pos);
                // LordHavoc: boosted color from 1.0, 0.8, 0.4 to 1.25, 1.0, 0.5
                Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-               CL_AllocDlight(NULL, &tempmatrix, 350, 2.5f, 2.0f, 1.0f, 700, 0.5, 0, 0, true, 1);
+               CL_AllocDlight(NULL, &tempmatrix, 350, 4.0f, 2.0f, 0.50f, 700, 0.5, 0, 0, true, 1);
                S_StartSound(-1, 0, cl_sfx_r_exp3, pos, 1, 1);
                break;
 
@@ -1307,14 +1310,14 @@ void CL_ParseTempEntity(void)
        case TE_LIGHTNING1:
                // lightning bolts
                if (!cl_model_bolt)
-                       cl_model_bolt = Mod_ForName("progs/bolt.mdl", true, false, false);
+                       cl_model_bolt = Mod_ForName("progs/bolt.mdl", false, false, false);
                CL_ParseBeam(cl_model_bolt, true);
                break;
 
        case TE_LIGHTNING2:
                // lightning bolts
                if (!cl_model_bolt2)
-                       cl_model_bolt2 = Mod_ForName("progs/bolt2.mdl", true, false, false);
+                       cl_model_bolt2 = Mod_ForName("progs/bolt2.mdl", false, false, false);
                CL_ParseBeam(cl_model_bolt2, true);
                break;
 
@@ -1551,7 +1554,12 @@ void CL_ParseServerMessage(void)
                        break;
 
                case svc_disconnect:
-                       Host_EndGame ("Server disconnected\n");
+                       Con_Printf ("Server disconnected\n");
+                       if (cls.demonum != -1)
+                               CL_NextDemo ();
+                       else
+                               CL_Disconnect ();
+                       break;
 
                case svc_print:
                        Con_Print(MSG_ReadString());
@@ -1812,7 +1820,7 @@ void CL_Parse_DumpPacket(void)
 void CL_Parse_Init(void)
 {
        // LordHavoc: added demo_nehahra cvar
-       cl_scores_mempool = Mem_AllocPool("client player info");
+       cl_scores_mempool = Mem_AllocPool("client player info", 0, NULL);
        Cvar_RegisterVariable (&demo_nehahra);
        if (gamemode == GAME_NEHAHRA)
                Cvar_SetValue("demo_nehahra", 1);