]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
changed the flat bump texture (for no bumpmap textures) to have a 128 height instead...
[xonotic/darkplaces.git] / cl_main.c
index 37ad08034dda5f6c1e59cd9ddee55d17f45c482d..19d058e3d8ecbc08264698d778328488cfa05b1a 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -53,7 +53,7 @@ cvar_t cl_explosions_size_end = {CVAR_SAVE, "cl_explosions_size_end", "128"};
 cvar_t cl_explosions_lifetime = {CVAR_SAVE, "cl_explosions_lifetime", "0.5"};
 
 cvar_t cl_stainmaps = {CVAR_SAVE, "cl_stainmaps", "1"};
-cvar_t cl_stainmapsclearonload = {CVAR_SAVE, "cl_stainmapsclearonload", "0"};
+cvar_t cl_stainmaps_clearonload = {CVAR_SAVE, "cl_stainmaps_clearonload", "1"};
 
 cvar_t cl_beams_polygons = {CVAR_SAVE, "cl_beams_polygons", "1"};
 cvar_t cl_beams_relative = {CVAR_SAVE, "cl_beams_relative", "1"};
@@ -959,10 +959,11 @@ static void CL_RelinkNetworkEntities(void)
 
        // start on the entity after the world
        entitylinkframenumber++;
-       for (i = 1, ent = cl_entities + 1;i < MAX_EDICTS;i++, ent++)
+       for (i = 1;i < MAX_EDICTS;i++)
        {
                if (cl_entities_active[i])
                {
+                       ent = cl_entities + i;
                        if (ent->state_current.active)
                                CL_LinkNetworkEntity(ent);
                        else
@@ -1300,6 +1301,23 @@ static void CL_TimeRefresh_f (void)
        Con_Printf("%f seconds (%f fps)\n", timedelta, 128/timedelta);
 }
 
+/*
+===========
+CL_Shutdown
+===========
+*/
+void CL_Shutdown (void)
+{
+       CL_CGVM_Shutdown();
+       CL_Particles_Shutdown();
+       CL_Parse_Shutdown();
+
+       SZ_Free (&cls.message);
+
+       Mem_FreePool (&cl_entities_mempool);
+       Mem_FreePool (&cl_refdef_mempool);
+}
+
 /*
 =================
 CL_Init
@@ -1367,7 +1385,7 @@ void CL_Init (void)
        Cvar_RegisterVariable(&cl_explosions_size_end);
        Cvar_RegisterVariable(&cl_explosions_lifetime);
        Cvar_RegisterVariable(&cl_stainmaps);
-       Cvar_RegisterVariable(&cl_stainmapsclearonload);
+       Cvar_RegisterVariable(&cl_stainmaps_clearonload);
        Cvar_RegisterVariable(&cl_beams_polygons);
        Cvar_RegisterVariable(&cl_beams_relative);
        Cvar_RegisterVariable(&cl_beams_lightatend);
@@ -1381,6 +1399,8 @@ void CL_Init (void)
        CL_Particles_Init();
        CL_Screen_Init();
        CL_CGVM_Init();
+
+       CL_Video_Init();
 }