Changeset 9396 in orxonox.OLD for branches/proxy/src/story_entities
- Timestamp:
- Jul 23, 2006, 10:07:23 PM (19 years ago)
- Location:
- branches/proxy/src/story_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/story_entities/game_world.cc
r9235 r9396 512 512 void GameWorld::display () 513 513 { 514 515 // if this server is a dedicated server the game workd does not need to be drawn 516 if( !GraphicsEngine::getInstance()->isDedicated()) 517 { 514 518 // render the reflection texture 515 519 this->renderPassReflection(); 516 520 // redner the refraction texture 517 521 this->renderPassRefraction(); 522 } 518 523 // render all 519 524 this->renderPassAll(); … … 643 648 LightManager::getInstance()->draw(); 644 649 645 /* Draw the BackGround */ 646 this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND)); 647 engine->drawBackgroundElements(); 648 649 /* draw all WorldEntiy groups */ 650 for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 651 this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 652 653 AtmosphericEngine::getInstance()->draw(); 654 655 if( unlikely( this->showBV)) 656 { 657 CDEngine* engine = CDEngine::getInstance(); 650 // only render the world if its not dedicated mode 651 if( !GraphicsEngine::getInstance()->isDedicated()) 652 { 653 /* Draw the BackGround */ 654 this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND)); 655 engine->drawBackgroundElements(); 656 657 /* draw all WorldEntiy groups */ 658 658 for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 659 engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel); 660 } 661 662 if( unlikely(this->showPNodes)) 663 PNode::getNullParent()->debugDraw(0); 659 this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 660 661 AtmosphericEngine::getInstance()->draw(); 662 663 if( unlikely( this->showBV)) 664 { 665 CDEngine* engine = CDEngine::getInstance(); 666 for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 667 engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel); 668 } 669 670 if( unlikely(this->showPNodes)) 671 PNode::getNullParent()->debugDraw(0); 672 673 // draw the game ruls 674 if( likely(this->dataTank->gameRule != NULL)) 675 this->dataTank->gameRule->draw(); 676 } 664 677 665 678 engine->draw(); 666 667 // draw the game ruls668 if( likely(this->dataTank->gameRule != NULL))669 this->dataTank->gameRule->draw();670 679 } 671 680 -
branches/proxy/src/story_entities/menu/game_menu.cc
r9369 r9396 574 574 OrxGui::GLGuiButton* createButton = new OrxGui::GLGuiPushButton("Create Server"); 575 575 serverNetworkBox->pack(createButton); 576 createButton->released.connect(this, &GameMenu::create Server);576 createButton->released.connect(this, &GameMenu::createMasterServer); 577 577 } 578 578 } … … 593 593 594 594 State::setOnline(true); 595 NetworkManager::getInstance()-> establishConnection( this->ipInputLine->_getText(), 9999 );595 NetworkManager::getInstance()->createClient( this->ipInputLine->_getText(), 9999 ); 596 596 597 597 Preferences::getInstance()->setString( "multiplayer", "lastVisitedServer", this->ipInputLine->_getText() ); … … 600 600 } 601 601 602 void GameMenu::create Server( )602 void GameMenu::createMasterServer( ) 603 603 { 604 604 PRINTF(0)("Create server\n" ); 605 605 606 606 State::setOnline(true); 607 NetworkManager::getInstance()->create Server( 9999 );607 NetworkManager::getInstance()->createMasterServer( 9999 ); 608 608 609 609 this->startLevel( 5 ); -
branches/proxy/src/story_entities/menu/game_menu.h
r9059 r9396 50 50 51 51 void showServerMenu(); 52 void create Server();52 void createMasterServer(); 53 53 54 54 -
branches/proxy/src/story_entities/multi_player_world_data.cc
r9388 r9396 47 47 #include "player_stats.h" 48 48 49 #include "proxy/ proxy_settings.h"49 #include "proxy/network_settings.h" 50 50 51 51 #include "glmenu_imagescreen.h" … … 112 112 const TiXmlElement* element = NULL; 113 113 114 if( NetworkManager::getInstance()->isMasterServer())114 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer()) 115 115 { 116 116 /* load the spawning points */ … … 148 148 element = element->FirstChildElement(); 149 149 150 if( NetworkManager::getInstance()->isMasterServer())150 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer()) 151 151 { 152 152 while( element != NULL) … … 206 206 207 207 208 if( NetworkManager::getInstance()->isMasterServer())208 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer()) 209 209 { 210 210 this->localPlayer = new Player(); … … 281 281 GameWorldData::loadScene(root); 282 282 283 // LoadParamXML(root, " ProxySettings", ProxySettings::getInstance(), ProxySettings, loadProxySettings);283 // LoadParamXML(root, "NetworkSettings", NetworkSettings::getInstance(), NetworkSettings, loadNetworkSettings); 284 284 285 285 // create server playable 286 if ( NetworkManager::getInstance()->isMasterServer())286 if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer()) 287 287 { 288 288 NetworkGameManager::getInstance()->signalNewPlayer( 0 ); … … 300 300 { 301 301 // delete the proxy settings 302 delete ProxySettings::getInstance();302 delete NetworkSettings::getInstance(); 303 303 304 304 /* call underlying function */
Note: See TracChangeset
for help on using the changeset viewer.