]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
got rid of my attempts to delay sending the ServerInfo packet until the first message...
[xonotic/darkplaces.git] / sv_user.c
index 152ec7849a9199a54748c4d2d22dec22eef75eb4..91f4ff345936763c28b742b74d796fd45fda4624 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -476,7 +476,7 @@ void SV_ReadClientMove (usercmd_t *move)
        // if paused or a local game, don't predict
        if (sv_predict.integer && (svs.maxclients > 1) && (!sv.paused))
                host_client->latency = host_client->ping;
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_ping)))
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_ping)))
                val->_float = host_client->ping * 1000.0;
 
        // read current angles
@@ -484,13 +484,13 @@ void SV_ReadClientMove (usercmd_t *move)
        for (i = 0;i < 3;i++)
                angle[i] = MSG_ReadFloat ();
 
-       VectorCopy (angle, host_client->edict->v->v_angle);
+       VectorCopy (angle, sv_player->v->v_angle);
 
        // read movement
        move->forwardmove = MSG_ReadShort ();
        move->sidemove = MSG_ReadShort ();
        move->upmove = MSG_ReadShort ();
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_movement)))
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_movement)))
        {
                val->vector[0] = move->forwardmove;
                val->vector[1] = move->sidemove;
@@ -499,19 +499,19 @@ void SV_ReadClientMove (usercmd_t *move)
 
        // read buttons
        bits = MSG_ReadByte ();
-       host_client->edict->v->button0 = bits & 1;
-       host_client->edict->v->button2 = (bits & 2)>>1;
+       sv_player->v->button0 = bits & 1;
+       sv_player->v->button2 = (bits & 2)>>1;
        // LordHavoc: added 6 new buttons
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_button3))) val->_float = ((bits >> 2) & 1);
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_button4))) val->_float = ((bits >> 3) & 1);
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_button5))) val->_float = ((bits >> 4) & 1);
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_button6))) val->_float = ((bits >> 5) & 1);
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_button7))) val->_float = ((bits >> 6) & 1);
-       if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_button8))) val->_float = ((bits >> 7) & 1);
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_button3))) val->_float = ((bits >> 2) & 1);
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_button4))) val->_float = ((bits >> 3) & 1);
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_button5))) val->_float = ((bits >> 4) & 1);
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_button6))) val->_float = ((bits >> 5) & 1);
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_button7))) val->_float = ((bits >> 6) & 1);
+       if ((val = GETEDICTFIELDVALUE(sv_player, eval_button8))) val->_float = ((bits >> 7) & 1);
 
        i = MSG_ReadByte ();
        if (i)
-               host_client->edict->v->impulse = i;
+               sv_player->v->impulse = i;
 }
 
 /*
@@ -556,14 +556,6 @@ nextmsg:
 
                        cmd = MSG_ReadChar ();
 
-#ifndef NOROUTINGFIX
-                       if (cmd != -1 && host_client->waitingforconnect)
-                       {
-                               host_client->waitingforconnect = false;
-                               host_client->sendserverinfo = true;
-                       }
-#endif
-
                        switch (cmd)
                        {
                        case -1: