int bits;
eval_t *val;
float total;
- edict_t *e = EDICT_NUM(host_client->edictnumber);
// read ping time
host_client->ping_times[host_client->num_pings % NUM_PING_TIMES] = sv.time - MSG_ReadFloat ();
// 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(e, eval_ping)))
+ if ((val = GETEDICTFIELDVALUE(sv_player, eval_ping)))
val->_float = host_client->ping * 1000.0;
// read current angles
for (i = 0;i < 3;i++)
angle[i] = MSG_ReadFloat ();
- VectorCopy (angle, e->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(e, eval_movement)))
+ if ((val = GETEDICTFIELDVALUE(sv_player, eval_movement)))
{
val->vector[0] = move->forwardmove;
val->vector[1] = move->sidemove;
// read buttons
bits = MSG_ReadByte ();
- e->v->button0 = bits & 1;
- e->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(e, eval_button3))) val->_float = ((bits >> 2) & 1);
- if ((val = GETEDICTFIELDVALUE(e, eval_button4))) val->_float = ((bits >> 3) & 1);
- if ((val = GETEDICTFIELDVALUE(e, eval_button5))) val->_float = ((bits >> 4) & 1);
- if ((val = GETEDICTFIELDVALUE(e, eval_button6))) val->_float = ((bits >> 5) & 1);
- if ((val = GETEDICTFIELDVALUE(e, eval_button7))) val->_float = ((bits >> 6) & 1);
- if ((val = GETEDICTFIELDVALUE(e, 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)
- e->v->impulse = i;
+ sv_player->v->impulse = i;
}
/*
if (!host_client->active)
continue;
- sv_player = EDICT_NUM(host_client->edictnumber);
+ sv_player = host_client->edict;
if (!SV_ReadClientMessage ())
{