Changeset 9041 in orxonox.OLD
- Timestamp:
- Jul 3, 2006, 3:30:01 PM (18 years ago)
- Location:
- branches/multi_player_map/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/multi_player_map/src/lib/network/network_manager.cc
r8708 r9041 52 52 /* initialize the references */ 53 53 this->networkStream = NULL; 54 this->sharedNetworkData = SharedNetworkData::getInstance();55 54 this->elapsedTime = 0.0f; 56 55 … … 70 69 NetworkManager::~NetworkManager() 71 70 { 71 PRINTF(0)("NetworkManager destructor\n"); 72 72 if ( this->networkStream ) 73 73 { … … 103 103 { 104 104 this->networkStream = new NetworkStream( name, port ); 105 this->sharedNetworkData->setDefaultSyncStream(this->networkStream);105 SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream); 106 106 this->networkStream->startHandshake(); 107 107 return 1; … … 115 115 int NetworkManager::createServer(unsigned int port) 116 116 { 117 this->sharedNetworkData->setHostID(0);118 this->sharedNetworkData->setGameServer(true);117 SharedNetworkData::getInstance()->setHostID(0); 118 SharedNetworkData::getInstance()->setGameServer(true); 119 119 this->networkStream = new NetworkStream(port); 120 this->sharedNetworkData->setDefaultSyncStream(this->networkStream);120 SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream); 121 121 this->networkStream->createNetworkGameManager(); 122 122 PRINTF(0)("CREATE SERVER\n"); -
branches/multi_player_map/src/lib/network/network_manager.h
r8228 r9041 40 40 41 41 /** Returns the hostID @return The hostID of the object */ 42 inline int getHostID() { return this->sharedNetworkData->getHostID(); }43 inline bool isGameServer() { return this->sharedNetworkData->isGameServer(); }42 inline int getHostID() { return SharedNetworkData::getInstance()->getHostID(); } 43 inline bool isGameServer() { return SharedNetworkData::getInstance()->isGameServer(); } 44 44 45 45 … … 58 58 NetworkStream* networkStream; //!< pointer to network stream 59 59 60 SharedNetworkData* sharedNetworkData; //!< reference to the shared data61 60 float elapsedTime; //!< elapsed time since the last network update 62 61 }; -
branches/multi_player_map/src/lib/network/network_stream.cc
r8623 r9041 111 111 serverSocket = NULL; 112 112 } 113 114 113 for ( PeerList::iterator i = peers.begin(); i!=peers.end(); i++) 115 114 { … … 133 132 } 134 133 } 135 136 134 for ( SynchronizeableList::const_iterator it = getSyncBegin(); it != getSyncEnd(); it ++ ) 137 135 (*it)->setNetworkStream( NULL ); -
branches/multi_player_map/src/story_entities/menu/game_menu.cc
r9034 r9041 510 510 511 511 this->ipInputLine = new OrxGui::GLGuiInputLine( ); 512 this->ipInputLine->setText( " localhost" );512 this->ipInputLine->setText( "tardis-d08" ); 513 513 this->clientNetworkBox->pack( this->ipInputLine ); 514 514 this->ipInputLine->connect(SIGNAL(ipInputLine, enterPushed), this, SLOT(GameMenu, connectToServer)); -
branches/multi_player_map/src/story_entities/multi_player_world.cc
r9008 r9041 27 27 #include "network_manager.h" 28 28 #include "network_game_manager.h" 29 30 #include "state.h" 29 31 30 32 … … 150 152 delete NetworkGameManager::getInstance(); 151 153 154 State::setOnline( false ); 155 152 156 return ErrorMessage(); 153 157 }
Note: See TracChangeset
for help on using the changeset viewer.