Made connect-state handling in kmatrix flow even more failsafe

This commit is contained in:
zicodxx 2009-02-15 19:12:16 +00:00
parent 80084bb032
commit 084295bf96
2 changed files with 3 additions and 3 deletions

View file

@ -3,6 +3,7 @@ D2X-Rebirth Changelog
20090215 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/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 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/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 main/menu.c: Make sure HostAddr buffer is directly saved as soon as we confirm it in the entry field
20090206 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 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

View file

@ -458,7 +458,7 @@ void kmatrix_view(int network)
digi_kill_sound_linked_to_object (Players[i].objnum); digi_kill_sound_linked_to_object (Players[i].objnum);
set_screen_mode( SCREEN_MENU ); set_screen_mode( SCREEN_MENU );
printf("%i\n",network);
WaitingForOthers=0; WaitingForOthers=0;
game_flush_inputs(); 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! // 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; Players[i].connected=CONNECT_KMATRIX_WAITING;
if (Players[i].connected!=oldstates[i]) if (Players[i].connected!=oldstates[i])