]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
Fix alpha transparent textures (used by HLBSP maps) in HL/Q1 BSP maps
[xonotic/darkplaces.git] / cl_main.c
index 37bb7c2c79cac226fe557cecfc70c4b8b7b58faf..39f46ab2399d1ab501395088ce46f653a351da59 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -95,6 +95,7 @@ CL_ClearState
 
 =====================
 */
+void CL_VM_ShutDown (void);
 void CL_ClearState(void)
 {
        int i;
@@ -283,7 +284,6 @@ void CL_ExpandEntities(int num)
        }
 }
 
-void CL_VM_ShutDown (void);
 /*
 =====================
 CL_Disconnect
@@ -304,6 +304,8 @@ void CL_Disconnect(void)
 
        Con_DPrintf("CL_Disconnect\n");
 
+    Cvar_SetValueQuick(&csqc_progcrc, -1);
+       Cvar_SetValueQuick(&csqc_progsize, -1);
        CL_VM_ShutDown();
 // stop sounds (especially looping!)
        S_StopAllSounds ();
@@ -879,7 +881,10 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qboolean interpolat
        e->render.flags = e->state_current.flags;
        e->render.effects = e->state_current.effects;
        VectorScale(e->state_current.colormod, (1.0f / 32.0f), e->render.colormod);
-       e->render.entitynumber = e - cl.entities;
+       if(e >= cl.entities && e < cl.entities + cl.num_entities)
+               e->render.entitynumber = e - cl.entities;
+       else
+               e->render.entitynumber = 0;
        if (e->state_current.flags & RENDER_COLORMAPPED)
                CL_SetEntityColormapColors(&e->render, e->state_current.colormap);
        else if (e->state_current.colormap > 0 && e->state_current.colormap <= cl.maxclients && cl.scores != NULL)
@@ -1990,7 +1995,7 @@ void CL_Locs_Save_f(void)
        FS_StripExtension(cl.worldmodel->name, locfilename, sizeof(locfilename));
        strlcat(locfilename, ".loc", sizeof(locfilename));
 
-       outfile = FS_Open(locfilename, "w", false, false);
+       outfile = FS_OpenRealFile(locfilename, "w", false);
        if (!outfile)
                return;
        // if any boxes are used then this is a proquake-format loc file, which