- Timestamp:
- Feb 14, 2011, 9:00:48 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network6/src/libraries/network/GamestateManager.cc
r7878 r7882 57 57 58 58 namespace orxonox 59 { 59 { 60 60 GamestateManager::GamestateManager() : 61 61 currentGamestate_(0), id_(0) … … 110 110 bool b = processGamestate(it->second); 111 111 assert(b); 112 //sendAck( it->second->getID(), it->second->getPeerID() );112 sendAck( it->second->getID(), it->second->getPeerID() ); 113 113 delete it->second; 114 114 } … … 140 140 if ( currentGamestate_ != 0 ) 141 141 delete currentGamestate_; 142 currentGamestate_ = new packet::Gamestate();143 142 uint8_t gsMode; 144 143 if( GameMode::isMaster() ) … … 153 152 assert(peerMap_.size()!=0); 154 153 newID = peerMap_[NETWORK_PEER_ID_SERVER].lastReceivedGamestateID; 154 if( newID == GAMESTATEID_INITIAL ) 155 { 156 return false; 157 } 155 158 } 156 159 157 if(!currentGamestate_->collectData(newID, gsMode)){ //we have no data to send 160 currentGamestate_ = new packet::Gamestate(); 161 162 if(!currentGamestate_->collectData(newID, gsMode)) 163 { //we have no data to send 158 164 delete currentGamestate_; 159 165 currentGamestate_=0; 166 return false; 160 167 } 161 168 return true;
Note: See TracChangeset
for help on using the changeset viewer.