naks now cause disconnection.

This commit is contained in:
Gregor Richards 2016-09-13 20:34:10 -04:00
parent b140b16b5d
commit a0cfdb8a9c

View File

@ -217,10 +217,13 @@ static bool netplay_get_cmd(netplay_t *netplay)
switch (cmd)
{
case NETPLAY_CMD_ACK:
case NETPLAY_CMD_NAK:
/* Why are we even bothering? */
return true;
case NETPLAY_CMD_NAK:
/* Disconnect now! */
return false;
case NETPLAY_CMD_INPUT:
{
uint32_t buffer[WORDS_PER_FRAME];
@ -243,8 +246,7 @@ static bool netplay_get_cmd(netplay_t *netplay)
if (buffer[0] != netplay->read_frame_count)
{
/* FIXME: Except on the first (null) frame, this should be
* impossible, so maybe just disconnect? */
/* Out of order = out of luck */
return netplay_cmd_nak(netplay);
}