From ba1c52add65ea4c09cebd2cb47dbea469a22883f Mon Sep 17 00:00:00 2001 From: meep-eep Date: Thu, 7 Dec 2006 05:03:40 +0000 Subject: [PATCH] Fix concurrent game over. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2579 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/doc/devel/netplay/todo | 5 ++--- sc2/src/sc2code/tactrans.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sc2/doc/devel/netplay/todo b/sc2/doc/devel/netplay/todo index e0c65b122..cf1d71c28 100644 --- a/sc2/doc/devel/netplay/todo +++ b/sc2/doc/devel/netplay/todo @@ -11,9 +11,6 @@ Medium-priority: - decent pause handling - make compilation of crc.c and checksum.c conditional. - negotiate checksum interval -- disconnect during battle will trigger the setup disconnect notification. -- Assertion 'NetState_battleActive(NetConnection_getState(conn))' in - Netplay_sendChecksum triggered. See #sc2 channel log. - Closing and destroying of NetConnections is a terrible mess. @@ -47,6 +44,8 @@ Low-priority: - maximum number of ships per side - maximum ship cost per side - ship properties +- Checks allConnected() shouldn't be needed if CHECK_ABORT is set + on disconnect. Future improvements/optimisations: diff --git a/sc2/src/sc2code/tactrans.c b/sc2/src/sc2code/tactrans.c index 66abd2def..83d553911 100644 --- a/sc2/src/sc2code/tactrans.c +++ b/sc2/src/sc2code/tactrans.c @@ -124,7 +124,8 @@ readyForBattleEndPlayer (NetConnection *conn, void *arg) BattleStateData *battleStateData; battleStateData = (BattleStateData *) NetConnection_getStateData(conn); - if (NetConnection_getState (conn) == NetState_interBattle) + if (NetConnection_getState (conn) == NetState_interBattle || + NetConnection_getState (conn) == NetState_endMelee) { // This connection is already ready. The entire synchronisation // protocol has already been done for this connection.