]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
PROTOCOL_DARKPLACES5
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 311752bc57fe6094b3ee28b3be9ca0a3c73e00f3..ee9248670c5c4feeca09c705faee3e68590ea68b 100644 (file)
--- a/host.c
+++ b/host.c
@@ -214,7 +214,7 @@ void Host_ServerOptions (void)
                Cvar_SetValueQuick(&deathmatch, 1);
 
        svs.maxclients = numplayers;
-       sv_clients_mempool = Mem_AllocPool("server clients");
+       sv_clients_mempool = Mem_AllocPool("server clients", 0, NULL);
        svs.clients = Mem_Alloc(sv_clients_mempool, sizeof(client_t) * svs.maxclients);
 }
 
@@ -455,8 +455,12 @@ void SV_DropClient(qboolean crash)
        NetConn_Heartbeat(1);
 
        // free the client now
+       if (host_client->entitydatabase)
+               EntityFrame_FreeDatabase(host_client->entitydatabase);
        if (host_client->entitydatabase4)
                EntityFrame4_FreeDatabase(host_client->entitydatabase4);
+       if (host_client->entitydatabase5)
+               EntityFrame5_FreeDatabase(host_client->entitydatabase5);
        // clear the client struct (this sets active to false)
        memset(host_client, 0, sizeof(*host_client));
 }
@@ -762,12 +766,10 @@ void _Host_Frame (float time)
        if (cls.signon == SIGNONS && cl.viewentity >= 0 && cl.viewentity < MAX_EDICTS && cl_entities[cl.viewentity].state_current.active)
        {
                // LordHavoc: this used to use renderer variables (eww)
-               vec3_t forward, left, up, origin;
-               Matrix4x4_ToVectors(&cl_entities[cl.viewentity].render.matrix, forward, left, up, origin);
-               S_Update(origin, forward, left, up);
+               S_Update(&cl_entities[cl.viewentity].render.matrix);
        }
        else
-               S_Update(vec3_origin, vec3_origin, vec3_origin, vec3_origin);
+               S_Update(&identitymatrix);
 
        CDAudio_Update();
 
@@ -951,5 +953,6 @@ void Host_Shutdown(void)
        }
 
        Sys_Shutdown();
+       Log_Close ();
 }