Changeset 1523
- Timestamp:
- Jun 3, 2008, 12:06:09 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/GameStateManager.cc
r1516 r1523 44 44 #include <iostream> 45 45 #include <zlib.h> 46 #include <assert.h> 46 47 47 48 #include "core/CoreIncludes.h" … … 473 474 if(gamestateID == GAMESTATEID_INITIAL){ 474 475 temp->setGameStateID(GAMESTATEID_INITIAL); 475 if(curid!=GAMESTATEID_INITIAL) 476 if(curid!=GAMESTATEID_INITIAL){ 477 assert(gameStateUsed.find(curid)!=gameStateUsed.end()); 476 478 --(gameStateUsed.find(curid)->second); 479 } 477 480 return; 478 481 } … … 484 487 // deleteUnusedGameState(curid); 485 488 //increase gamestateused 486 if(curid!=GAMESTATEID_INITIAL) 487 --(gameStateUsed.find(curid)->second); 488 ++(gameStateUsed.find(gamestateID)->second); 489 temp->setGameStateID(gamestateID); 489 std::map<int, int>::iterator it = gameStateUsed.find(curid); 490 if(curid!=GAMESTATEID_INITIAL){ 491 if(it!=gameStateUsed.end()) 492 --(it->second); 493 } 494 it = gameStateUsed.find(gamestateID); 495 if(it!=gameStateUsed.end()){ 496 ++(it->second); 497 temp->setGameStateID(gamestateID); 498 } 490 499 /* 491 500 GameState *old = clientGameState[clientID];
Note: See TracChangeset
for help on using the changeset viewer.