From 65e308c92d6a8792fdc539de50b18195030197a2 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Thu, 22 Sep 2016 21:56:19 -0400 Subject: [PATCH] Reset player flip state when we lose Netplay connection This fixes a bug whereby reconnections would be out of sync due to the flip state of the server and client being different. The server now resets its flip state on disconnect. --- network/netplay/netplay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/network/netplay/netplay.c b/network/netplay/netplay.c index b35e78c9c5..6134b19331 100644 --- a/network/netplay/netplay.c +++ b/network/netplay/netplay.c @@ -77,7 +77,11 @@ static void hangup(netplay_t *netplay) } netplay->has_connection = false; + + /* Reset things that will behave oddly if we get a new connection */ netplay->remote_paused = false; + netplay->flip = false; + netplay->flip_frame = 0; } }