From 084295bf96bc4ec616ef1a29898daae09ac7ef3e Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sun, 15 Feb 2009 19:12:16 +0000 Subject: [PATCH] Made connect-state handling in kmatrix flow even more failsafe --- CHANGELOG.txt | 2 +- main/kmatrix.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 705334234..d9e409048 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D2X-Rebirth Changelog 20090215 -------- main/network.c, main/noloss.c, main/noloss.h: Added list to keep trace of received PDATA packets so receiver won't interpret them several times +main/kmatrix.c: Made connect-state handling in kmatrix flow even more failsafe 20090209 -------- @@ -14,7 +15,6 @@ main/gameseq.c: When creating new player, make sure string is long enough for us main/multi.c, main/network.h, main/kmatrix.c, main/kmatrix.h: Fixed connect-state mess in order of kmatrix flow main/menu.c: Make sure HostAddr buffer is directly saved as soon as we confirm it in the entry field - 20090206 -------- INSTALL.txt, main/network.c, main/network.h, main/noloss.c: Small docs update; Noloss thinking flaw correccted: Add a special type for PDATA packets that need to be ACK'd so other clients won't ACK everything diff --git a/main/kmatrix.c b/main/kmatrix.c index 3d3a5696e..b1c7520d9 100644 --- a/main/kmatrix.c +++ b/main/kmatrix.c @@ -458,7 +458,7 @@ void kmatrix_view(int network) digi_kill_sound_linked_to_object (Players[i].objnum); set_screen_mode( SCREEN_MENU ); -printf("%i\n",network); + WaitingForOthers=0; game_flush_inputs(); @@ -575,7 +575,7 @@ printf("%i\n",network); } // Important: Make sure we keep connected state CONNECT_KMATRIX_WAITING even if player exits kmatrix loop which will change to CONNECT_WAITING! If we don't get all palyer packets in sync and order this condition is very handy to keep all connections alive! - if (oldstates[i]==CONNECT_KMATRIX_WAITING && (Players[i].connected!=0 || Players[i].connected!=CONNECT_KMATRIX_WAITING)) + if ((oldstates[i]==CONNECT_END_MENU || oldstates[i]==CONNECT_KMATRIX_WAITING) && (Players[i].connected!=0 || Players[i].connected!=CONNECT_END_MENU || Players[i].connected!=CONNECT_KMATRIX_WAITING)) Players[i].connected=CONNECT_KMATRIX_WAITING; if (Players[i].connected!=oldstates[i])