Changeset 6672 in orxonox.OLD for branches/network/src/lib/network/network_game_manager.cc
- Timestamp:
- Jan 24, 2006, 3:02:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_game_manager.cc
r6670 r6672 53 53 this->setClassID(CL_NETWORK_GAME_MANAGER, "NetworkGameManager"); 54 54 55 newUniqueID = MAX_CONNECTIONS + 2;56 57 55 hasRequestedWorld = false; 58 56 this->setSynchronized(true); … … 215 213 if ( this->isServer() ) 216 214 { 217 if ( newUniqueID< 0 )215 if ( NetworkManager::getInstance()->getNewUniqueID() < 0 ) 218 216 { 219 217 PRINTF(1)("Cannot create entity! There are no more uniqueIDs left!\n"); … … 221 219 } 222 220 223 return this->executeCreateEntity( classID, newUniqueID++, owner );221 return this->executeCreateEntity( classID, NetworkManager::getInstance()->getNewUniqueID(), owner ); 224 222 } 225 223 else … … 240 238 if ( this->isServer() ) 241 239 { 242 if ( newUniqueID< 0 )240 if ( NetworkManager::getInstance()->getNewUniqueID() < 0 ) 243 241 { 244 242 PRINTF(1)("Cannot create entity! There are no more uniqueIDs left!\n"); … … 258 256 { 259 257 Synchronizeable * s = dynamic_cast<Synchronizeable*>(b); 260 s->setUniqueID( newUniqueID++);258 s->setUniqueID( NetworkManager::getInstance()->getNewUniqueID() ); 261 259 s->setOwner( 0 ); 262 260 // all entities created via this function are added automaticaly to the synchronizeable list
Note: See TracChangeset
for help on using the changeset viewer.