]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
rollback recent network compression changes, it really does have to be reset on level...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Feb 2006 05:35:37 +0000 (05:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Feb 2006 05:35:37 +0000 (05:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5970 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 3007fa617c8ac42aa1cc4136707404de69d9860f..b817cc97053d977746e799ccb20d95cd16715581 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -306,7 +306,24 @@ void SV_SendServerinfo (client_t *client)
        client->weaponmodelindex = 0;
 
        // LordHavoc: clear entityframe tracking
-       //client->latestframenum = 0;
+       client->latestframenum = 0;
+
+       if (client->entitydatabase)
+               EntityFrame_FreeDatabase(client->entitydatabase);
+       if (client->entitydatabase4)
+               EntityFrame4_FreeDatabase(client->entitydatabase4);
+       if (client->entitydatabase5)
+               EntityFrame5_FreeDatabase(client->entitydatabase5);
+
+       if (sv.protocol != PROTOCOL_QUAKE && sv.protocol != PROTOCOL_QUAKEDP && sv.protocol != PROTOCOL_NEHAHRAMOVIE)
+       {
+               if (sv.protocol == PROTOCOL_DARKPLACES1 || sv.protocol == PROTOCOL_DARKPLACES2 || sv.protocol == PROTOCOL_DARKPLACES3)
+                       client->entitydatabase = EntityFrame_AllocDatabase(sv_mempool);
+               else if (sv.protocol == PROTOCOL_DARKPLACES4)
+                       client->entitydatabase4 = EntityFrame4_AllocDatabase(sv_mempool);
+               else
+                       client->entitydatabase5 = EntityFrame5_AllocDatabase(sv_mempool);
+       }
 
        SZ_Clear (&client->netconnection->message);
        MSG_WriteByte (&client->netconnection->message, svc_print);
@@ -418,19 +435,7 @@ void SV_ConnectClient (int clientnum, netconn_t *netconnection)
        // don't call SendServerinfo for a fresh botclient because its fields have
        // not been set up by the qc yet
        if (client->netconnection)
-       {
                SV_SendServerinfo (client);
-               if (sv.protocol != PROTOCOL_QUAKE && sv.protocol != PROTOCOL_QUAKEDP && sv.protocol != PROTOCOL_NEHAHRAMOVIE)
-               {
-                       if (sv.protocol == PROTOCOL_DARKPLACES1 || sv.protocol == PROTOCOL_DARKPLACES2 || sv.protocol == PROTOCOL_DARKPLACES3)
-                               client->entitydatabase = EntityFrame_AllocDatabase(sv_mempool);
-                       else if (sv.protocol == PROTOCOL_DARKPLACES4)
-                               client->entitydatabase4 = EntityFrame4_AllocDatabase(sv_mempool);
-                       else
-                               client->entitydatabase5 = EntityFrame5_AllocDatabase(sv_mempool);
-               }
-
-       }
        else
                client->spawned = true;
 }