- Timestamp:
- Apr 10, 2008, 11:53:16 AM (17 years ago)
- Location:
- code/branches/network/src/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/GameStateManager.cc
r1005 r1007 59 59 60 60 void GameStateManager::update(){ 61 cleanup(); 61 62 reference = getSnapshot(id); 62 63 gameStateMap.insert(std::pair<int, GameState*>(id, reference)); … … 86 87 gameStateMap.erase((*it).first); 87 88 gameStateUsed.erase(it++); 88 }else 89 it++;89 }else //as soon as we got a used gamestate break here because we could use newer gamestates in future 90 break; 90 91 } 91 92 } -
code/branches/network/src/network/GameStateManager.h
r1005 r1007 47 47 //#### END TESTING PURPOSE #### 48 48 void update(); 49 void cleanup(); // "garbage handler"50 49 GameStateCompressed *popGameState(int clientID); 51 50 void ackGameState(int clientID, int gamestateID); 52 51 int id; 53 52 private: 53 void cleanup(); // "garbage handler" 54 54 GameState *getSnapshot(int id); 55 55 GameStateCompressed *encode(GameState *a, GameState *b); -
code/branches/network/src/network/Server.cc
r918 r1007 114 114 updateGamestate(); 115 115 116 sleep(1); // TODO remove116 //sleep(1); // TODO remove 117 117 return; 118 118 }
Note: See TracChangeset
for help on using the changeset viewer.