- Timestamp:
- Oct 19, 2008, 11:53:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/GamestateManager.cc
r1944 r1960 64 64 return getSnapshot(); 65 65 } 66 66 67 67 bool GamestateManager::add(packet::Gamestate *gs, int clientID){ 68 68 assert(gs); … … 75 75 return true; 76 76 } 77 77 78 78 bool GamestateManager::processGamestates(){ 79 79 std::map<int, packet::Gamestate*>::iterator it; … … 87 87 return true; 88 88 } 89 90 89 90 91 91 bool GamestateManager::getSnapshot(){ 92 92 reference = new packet::Gamestate(); … … 97 97 return true; 98 98 } 99 99 100 100 /** 101 101 * this function is used to keep the memory usage low 102 102 * it tries to delete all the unused gamestates 103 * 104 * 103 * 104 * 105 105 */ 106 106 /* void GamestateManager::cleanup(){ … … 160 160 return gs; 161 161 } 162 163 162 163 164 164 bool GamestateManager::ack(int gamestateID, int clientID) { 165 165 ClientInformation *temp = ClientInformation::findClient(clientID); 166 166 assert(temp); 167 167 int curid = temp->getGamestateID(); 168 168 169 169 if(gamestateID == 0){ 170 170 temp->setGamestateID(GAMESTATEID_INITIAL); 171 171 return true; 172 172 } 173 173 174 174 assert(curid<gamestateID); 175 175 COUT(4) << "acking gamestate " << gamestateID << " for clientid: " << clientID << " curid: " << curid << std::endl; … … 194 194 gamestateMap_.erase(clientMap); 195 195 } 196 196 197 197 bool GamestateManager::processGamestate(packet::Gamestate *gs){ 198 198 if(gs->isCompressed())
Note: See TracChangeset
for help on using the changeset viewer.