// limit reported time to current time
// (incase the client is trying to cheat)
- move->time = min(move->time, move->receivetime);
+ move->time = min(move->time, move->receivetime + sv.frametime);
// read current angles
for (i = 0;i < 3;i++)
if (msg_badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__);
}
- if (move->sequence && move->sequence <= host_client->movesequence)
+ if (move->sequence && move->sequence <= host_client->movesequence && move->sequence >= host_client->movesequence - 16)
{
// repeat of old input (to fight packet loss)
+ // the >= -16 check avoids frozen players after a level change
return kickplayer;
}
{
if (!move->impulse)
move->impulse = host_client->cmd.impulse;
- move->buttons |= host_client->cmd.impulse;
+ move->buttons |= host_client->cmd.buttons;
}
moveframetime = bound(0, move->time - host_client->cmd.time, 0.1);
- Con_Printf("movesequence = %i (%i lost), moveframetime = %f\n", move->sequence, move->sequence ? move->sequence - host_client->movesequence - 1 : 0, moveframetime);
+ //Con_Printf("movesequence = %i (%i lost), moveframetime = %f\n", move->sequence, move->sequence ? move->sequence - host_client->movesequence - 1 : 0, moveframetime);
// disable clientside movement prediction in some cases
if (ceil((move->receivetime - move->time) * 1000.0) < sv_clmovement_minping.integer)