Changeset 6662 in orxonox.OLD for branches/network/src/lib
- Timestamp:
- Jan 23, 2006, 4:12:02 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/handshake.cc
r6661 r6662 23 23 24 24 Handshake::Handshake( bool server, int clientId, int networkGameManagerId ) 25 : Synchronizeable() 25 26 { 26 27 /* set the class id for the base object */ -
branches/network/src/lib/network/network_game_manager.cc
r6661 r6662 249 249 s->setUniqueID( newUniqueID++ ); 250 250 s->setOwner( 0 ); 251 // all entities created via this function are added automaticaly to the synchronizeable list 252 s->setSynchronized(true); 251 253 return b; 252 254 } … … 408 410 while ( it != e ) 409 411 { 410 PRINTF(5)("SENDING ENTITY %s id %d\n", (*it)->getClassName(), (*it)->getUniqueID() ); 411 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafClassID()) ) ) 412 return; 413 414 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getUniqueID()) ) ) 415 return; 416 417 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) ) 418 return; 419 412 if( (*it)->beSynchronized()) 413 { 414 PRINTF(0)("SENDING ENTITY %s id %d\n", (*it)->getClassName(), (*it)->getUniqueID() ); 415 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafClassID()) ) ) 416 return; 417 418 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getUniqueID()) ) ) 419 return; 420 421 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) ) 422 return; 423 } 420 424 it++; 421 425 } … … 481 485 s->setUniqueID( uniqueID ); 482 486 s->setOwner( owner ); 483 this->networkStream->connectSynchronizeable( *s );487 //this->networkStream->connectSynchronizeable( *s ); 484 488 if ( !isServer() ) 485 489 s->setIsOutOfSync( true ); -
branches/network/src/lib/network/network_manager.cc
r6660 r6662 101 101 102 102 this->defaultSyncStream = new NetworkStream(ipAddress); 103 this->defaultSyncStream->startHandshake(); 103 104 return 1; 104 105 }
Note: See TracChangeset
for help on using the changeset viewer.