Changeset 6660 in orxonox.OLD for branches/network
- Timestamp:
- Jan 23, 2006, 3:38:45 PM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/coord/p_node.cc
r6659 r6660 697 697 PNode::nullParent = new PNode(NULL, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_TO_NULL); 698 698 PNode::nullParent->setName("NullParent"); 699 PNode::nullParent->setSynchronized(true); 699 700 } 700 701 return PNode::nullParent; -
branches/network/src/lib/network/network_game_manager.cc
r6634 r6660 247 247 s->setUniqueID( newUniqueID++ ); 248 248 s->setOwner( 0 ); 249 this->networkStream->connectSynchronizeable( *s );250 249 return b; 251 250 } -
branches/network/src/lib/network/network_manager.cc
r6659 r6660 183 183 void NetworkManager::debug() 184 184 { 185 PRINT(0)("=================Network::debug()=========\n"); 185 186 this->defaultSyncStream->debug(); 187 PRINT(0)("===========================================\n"); 186 188 } -
branches/network/src/lib/network/network_stream.cc
r6659 r6660 53 53 } 54 54 55 55 56 NetworkStream::NetworkStream(IPaddress& address) 56 57 { … … 60 61 this->networkProtocol = new NetworkProtocol(); 61 62 this->connectionMonitor = new ConnectionMonitor(); 62 63 Handshake* hs = new Handshake(false);64 hs->setUniqueID( 0 );65 this->handshakes.push_back(hs);66 this->connectSynchronizeable(*hs);67 PRINTF(0)("NetworkStream: %s\n", hs->getName());68 63 this->maxConnections = 1; 69 64 } … … 136 131 137 132 133 void NetworkStream::startHandshake() 134 { 135 Handshake* hs = new Handshake(false); 136 hs->setUniqueID( 0 ); 137 this->handshakes.push_back(hs); 138 //this->connectSynchronizeable(*hs); 139 PRINTF(0)("NetworkStream: %s\n", hs->getName()); 140 } 141 142 138 143 void NetworkStream::connectSynchronizeable(Synchronizeable& sync) 139 144 { … … 426 431 void NetworkStream::debug() 427 432 { 428 PRINT(0)("=================NetworkStream::debug()====\n"); 429 PRINT(0)(" Host ID: %i\n", this->myHostId); 430 431 PRINT(0)(" Got %i connected Synchronizeables:\n", this->synchronizeables.size()); 433 if( this->isServer()) 434 PRINT(0)(" Host ist Server with ID: %i\n", this->myHostId); 435 else 436 PRINT(0)(" Host ist Client with ID: %i\n", this->myHostId); 437 438 PRINT(0)(" Got %i connected Synchronizeables, showing active Syncs:\n", this->synchronizeables.size()); 432 439 for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++) 433 440 { 434 PRINT(0)(" Synchronizeable of class: %s::%s, with unique ID: %i, Synchronize: %i\n", (*it)->getClassName(), (*it)->getName(), (*it)->getUniqueID(), (*it)->beSynchronized()); 435 } 436 441 if( (*it)->beSynchronized() == true) 442 PRINT(0)(" Synchronizeable of class: %s::%s, with unique ID: %i, Synchronize: %i\n", (*it)->getClassName(), (*it)->getName(), 443 (*it)->getUniqueID(), (*it)->beSynchronized()); 444 } 437 445 PRINT(0)(" Maximal Connections: %i\n", this->maxConnections); 438 PRINT(0)("===========================================\n"); 439 440 } 441 442 443 444 445 446 447 448 449 450 451 452 453 454 446 447 } 448 449 450 451 452 453 454 455 456 457 458 459 460 461 -
branches/network/src/lib/network/network_stream.h
r6659 r6660 41 41 42 42 void createNetworkGameManager(); 43 void startHandshake(); 43 44 44 45 void connectSynchronizeable(Synchronizeable& sync); -
branches/network/src/world_entities/weapons/weapon.cc
r6512 r6660 103 103 this->energyWidget = NULL; 104 104 this->energyLoadedWidget = NULL; 105 106 // set this object to be synchronized over network 107 this->setSynchronized(true); 105 108 } 106 109
Note: See TracChangeset
for help on using the changeset viewer.