shithub: qk1

Download patch

ref: f2f725ccdcee661c2eb432ba7abb0d0f332dbc25
parent: 81829a02f3745b7914ed8f6f95632a3757c71073
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Thu Nov 2 13:49:58 EDT 2023

cl: bring back entities reset

--- a/cl_main.c
+++ b/cl_main.c
@@ -50,9 +50,15 @@
 // wipe the entire cl structure
 	memset(&cl, 0, sizeof cl);
 
+	//if(cls.state == ca_connected)
+		stopallsfx();
+
 	SZ_Clear (&cls.message);
-	memset(cl_dlights, 0, sizeof cl_dlights);
+	CL_ResetTEnts();
+	memset(cl_static_entities, 0, MAX_STATIC_ENTITIES * sizeof(*cl_static_entities));
+	memset(cl_entities, 0, MAX_EDICTS*sizeof(*cl_entities));
 	memset(cl_lightstyle, 0, sizeof cl_lightstyle);
+	memset(cl_dlights, 0, sizeof cl_dlights);
 	memset(cl_beams, 0, sizeof cl_beams);
 
 //
--- a/cl_tent.c
+++ b/cl_tent.c
@@ -232,6 +232,12 @@
 	return ent;
 }
 
+void
+CL_ResetTEnts(void)
+{
+	memset(cl_temp_entities, 0, sizeof(cl_temp_entities));
+	num_temp_entities = 0;
+}
 
 /*
 =================