[Orxonox-commit 3630] r8315 - code/branches/network6/src/libraries/network

scheusso at orxonox.net scheusso at orxonox.net
Sat Apr 23 22:28:15 CEST 2011


Author: scheusso
Date: 2011-04-23 22:28:14 +0200 (Sat, 23 Apr 2011)
New Revision: 8315

Modified:
   code/branches/network6/src/libraries/network/GamestateManager.cc
Log:
fixing an assertion


Modified: code/branches/network6/src/libraries/network/GamestateManager.cc
===================================================================
--- code/branches/network6/src/libraries/network/GamestateManager.cc	2011-04-23 08:56:00 UTC (rev 8314)
+++ code/branches/network6/src/libraries/network/GamestateManager.cc	2011-04-23 20:28:14 UTC (rev 8315)
@@ -286,8 +286,10 @@
 //       return true;
 //     }
 
-    assert(curid==GAMESTATEID_INITIAL || curid<=gamestateID);
-    COUT(5) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << std::endl;
+//    assert(curid==GAMESTATEID_INITIAL || curid<=gamestateID); // this line is commented out because acknowledgements are unreliable and may arrive in distorted order
+    if( gamestateID <= curid )
+        return true;
+COUT(4) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << std::endl;
     std::map<uint32_t, packet::Gamestate*>::iterator it2;
     for( it2=it->second.gamestates.begin(); it2!=it->second.gamestates.end(); )
     {




More information about the Orxonox-commit mailing list