]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
remove the exec default.cfg call from the reset to defaults, I have no idea why it...
[xonotic/darkplaces.git] / sv_user.c
index 05624d81c8041b2be7bc217de902ff87766627c1..a5645629d14f181e7f53010399a02a8473f4b0e8 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -66,7 +66,7 @@ void SV_SetIdealPitch (void)
 
                tr = SV_Move (top, vec3_origin, vec3_origin, bottom, MOVE_NOMONSTERS, sv_player);
                // if looking at a wall, leave ideal the way is was
-               if (tr.allsolid)
+               if (tr.startsolid)
                        return;
 
                // near a dropoff
@@ -623,7 +623,7 @@ void SV_ReadClientMove (usercmd_t *move)
                val->_float = host_client->ping * 1000.0;
 
        // read current angles
-       // DPPROTOCOL_VERSION4
+       // PROTOCOL_DARKPLACES4
        for (i = 0;i < 3;i++)
                angle[i] = MSG_ReadPreciseAngle();
 
@@ -665,14 +665,14 @@ SV_ReadClientMessage
 extern void SV_SendServerinfo(client_t *client);
 void SV_ReadClientMessage(void)
 {
-       int cmd, clientnum = host_client->number;
+       int cmd;
        char *s;
 
        //MSG_BeginReading ();
 
        for(;;)
        {
-               if (!(host_client = svs.connectedclients[clientnum]))
+               if (!host_client->active)
                {
                        // a command caused an error
                        SV_DropClient (false);
@@ -743,10 +743,10 @@ void SV_ReadClientMessage(void)
                        break;
 
                case clc_ackentities:
-                       //if (dpprotocol == DPPROTOCOL_VERSION1 || dpprotocol == DPPROTOCOL_VERSION2 || dpprotocol == DPPROTOCOL_VERSION3)
-                       //      EntityFrame_AckFrame(&host_client->entitydatabase, MSG_ReadLong());
-                       //else
-                               EntityFrame4_AckFrame(host_client->entitydatabase4, MSG_ReadLong());
+                       host_client->entitydatabase4->ackframenum = MSG_ReadLong();
+                       if (developer_networkentities.integer >= 1)
+                               Con_Printf("recv clc_ackentities %i\n", host_client->entitydatabase4->ackframenum);
+                       EntityFrame4_AckFrame(host_client->entitydatabase4, host_client->entitydatabase4->ackframenum);
                        break;
                }
        }
@@ -761,13 +761,11 @@ void SV_RunClients (void)
 {
        int i;
 
-       for (i = 0;i < MAX_SCOREBOARD;i++)
+       for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
        {
-               if (!(host_client = svs.connectedclients[i]))
+               if (!host_client->active)
                        continue;
 
-               sv_player = host_client->edict;
-
                if (!host_client->spawned)
                {
                        // clear client movement until a new packet is received
@@ -777,6 +775,8 @@ void SV_RunClients (void)
 
                if (sv.frametime)
                {
+                       sv_player = host_client->edict;
+
                        // LordHavoc: QuakeC replacement for SV_ClientThink (player movement)
                        if (SV_PlayerPhysicsQC)
                        {