Changeset 6230 in orxonox.OLD for branches/network/src
- Timestamp:
- Dec 21, 2005, 2:59:06 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_game_manager.cc
r6219 r6230 30 30 /* using namespace std is default, this needs to be here */ 31 31 using namespace std; 32 33 NetworkManager* NetworkManager::singletonRef = NULL; 32 34 33 35 /*! -
branches/network/src/lib/network/network_game_manager.h
r6219 r6230 61 61 { 62 62 public: 63 NetworkGameManager();64 63 ~NetworkGameManager(); 64 65 static NetworkGameManager* NetworkGameManager::getInstance() { if (!NetworkGameManager::singletonRef) NetworkGameManager::singletonRef = new NetworkGameManager(); return NetworkGameManager::singletonRef; } 65 66 66 67 virtual void writeBytes(const byte* data, int length, int sender); … … 78 79 79 80 private: 81 NetworkGameManager(); 82 80 83 void requestCreateEntity(ClassID classID); 81 84 void executeCreateEntity(ClassID classID, int uniqueID = 0, int owner = 0); … … 109 112 std::vector<clientBuffer> outBuffer; 110 113 clientBuffer allOutBuffer; 114 static NetworkGameManager* singletonRef; 111 115 112 116 int newUniqueID; -
branches/network/src/lib/network/network_stream.cc
r6220 r6230 78 78 this->handshakes.push_back( NULL ); 79 79 this->bActive = true; 80 this->networkGameManager = new NetworkGameManager();80 this->networkGameManager = NetworkGameManager::getInstance(); 81 81 // setUniqueID( maxCon+2 ) because we need one id for every handshake 82 82 // and one for handshake to reject client maxCon+1 … … 181 181 myHostId = NetworkManager::getInstance()->getHostID(); 182 182 183 this->networkGameManager = new NetworkGameManager();183 this->networkGameManager = NetworkGameManager::getInstance(); 184 184 this->networkGameManager->setUniqueID( handshakes[i]->getNetworkGameManagerId() ); 185 185 this->connectSynchronizeable( *(this->networkGameManager) );
Note: See TracChangeset
for help on using the changeset viewer.