Changeset 7631 in orxonox.OLD for branches/network/src/lib/network/network_stream.cc
- Timestamp:
- May 17, 2006, 8:28:23 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_stream.cc
r7614 r7631 62 62 this->init(); 63 63 this->peers[0].socket = new UdpSocket( host, port ); 64 this->peers[0].userId = 0; 65 this->peers[0].isServer = true; 64 66 this->networkProtocol = new NetworkProtocol(); 65 67 this->connectionMonitor = new ConnectionMonitor(); … … 357 359 peers[clientId].handshake->setUniqueID(clientId); 358 360 peers[clientId].userId = clientId; 361 peers[clientId].isServer = false; 359 362 } else 360 363 { … … 369 372 peers[clientId].handshake->setUniqueID(clientId); 370 373 peers[clientId].userId = clientId; 374 peers[clientId].isServer = false; 371 375 372 376 PRINTF(0)("num sync: %d\n", synchronizeables.size()); … … 400 404 delete it->second.handshake; 401 405 it->second.handshake = NULL; 402 406 407 for ( SynchronizeableList::iterator it2 = synchronizeables.begin(); it2 != synchronizeables.end(); it2++ ) 408 { 409 (*it2)->cleanUpUser( it->second.userId ); 410 } 403 411 404 412 NetworkGameManager::getInstance()->signalLeftPlayer(it->second.userId); … … 632 640 int leafClassId; 633 641 if ( INTSIZE > length - offset ) 634 break; 642 { 643 offset += syncDataLength; 644 continue; 645 } 635 646 636 647 Converter::byteArrayToInt( buf + offset, &leafClassId ); … … 639 650 /* These are some small exeptions in creation: Not all objects can/should be created via Factory */ 640 651 /* Exception 1: NullParent */ 641 if( leafClassId == CL_NULL_PARENT) 642 { 643 PRINTF(1)("Can not create Class with ID %x!", (int)leafClassId); 644 break; 652 if( leafClassId == CL_NULL_PARENT || leafClassId == CL_SYNCHRONIZEABLE ) 653 { 654 PRINTF(1)("Can not create Class with ID %x!\n", (int)leafClassId); 655 offset += syncDataLength; 656 continue; 645 657 } 646 658 else … … 650 662 { 651 663 PRINTF(1)("Could not fabricate Object with classID %x\n", leafClassId); 652 break; 664 offset += syncDataLength; 665 continue; 653 666 } 654 667 … … 663 676 else 664 677 { 665 PRINTF(1)("Class with ID %x is not a synchronizeable! ", (int)leafClassId);678 PRINTF(1)("Class with ID %x is not a synchronizeable!\n", (int)leafClassId); 666 679 delete b; 667 break; 680 offset += syncDataLength; 681 continue; 668 682 } 669 683 }
Note: See TracChangeset
for help on using the changeset viewer.