// wipe the entire cl structure
memset (&cl, 0, sizeof(cl));
// reset the view zoom interpolation
- cl.viewzoomold = cl.viewzoomnew = 1;
+ cl.mviewzoom[0] = cl.mviewzoom[1] = 1;
SZ_Clear (&cls.message);
CL_Disconnect();
NetConn_ClientFrame();
NetConn_ServerFrame();
-
+
if (LHNETADDRESS_FromString(&cls.connect_address, host, 26000) && (cls.connect_mysocket = NetConn_ChooseClientSocketForAddress(&cls.connect_address)))
{
cls.connect_trying = true;
// 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
int i;
float d;
- cl.viewzoom = cl.viewzoomold + frac * (cl.viewzoomnew - cl.viewzoomold);
-
+ cl.viewzoom = cl.mviewzoom[1] + frac * (cl.mviewzoom[0] - cl.mviewzoom[1]);
for (i = 0;i < 3;i++)
+ {
+ cl.punchangle[i] = cl.mpunchangle[1][i] + frac * (cl.mpunchangle[0][i] - cl.mpunchangle[1][i]);
+ cl.punchvector[i] = cl.mpunchvector[1][i] + frac * (cl.mpunchvector[0][i] - cl.mpunchvector[1][i]);
cl.velocity[i] = cl.mvelocity[1][i] + frac * (cl.mvelocity[0][i] - cl.mvelocity[1][i]);
+ }
if (cls.demoplayback)
{
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