Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9396 in orxonox.OLD for branches/proxy/src/story_entities


Ignore:
Timestamp:
Jul 23, 2006, 10:07:23 PM (19 years ago)
Author:
patrick
Message:

committing my weekends work: 2100 lines :D

  • proxy server now accepts and synchronizes clients like a master server
  • network manager got different network setup interface
  • network stream got different constructure scheme
  • permissions checking and algorithm extended and changed
  • starting ability to connect to multiple network nodes at the same time
  • some very much smaller changes here and there
Location:
branches/proxy/src/story_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/story_entities/game_world.cc

    r9235 r9396  
    512512void GameWorld::display ()
    513513{
     514
     515    // if this server is a dedicated server the game workd does not need to be drawn
     516  if( !GraphicsEngine::getInstance()->isDedicated())
     517  {
    514518  // render the reflection texture
    515519  this->renderPassReflection();
    516520  // redner the refraction texture
    517521  this->renderPassRefraction();
     522  }
    518523  // render all
    519524  this->renderPassAll();
     
    643648  LightManager::getInstance()->draw();
    644649
    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 */
    658658    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  }
    664677
    665678  engine->draw();
    666 
    667   // draw the game ruls
    668   if( likely(this->dataTank->gameRule != NULL))
    669     this->dataTank->gameRule->draw();
    670679}
    671680
  • branches/proxy/src/story_entities/menu/game_menu.cc

    r9369 r9396  
    574574      OrxGui::GLGuiButton* createButton = new OrxGui::GLGuiPushButton("Create Server");
    575575      serverNetworkBox->pack(createButton);
    576       createButton->released.connect(this, &GameMenu::createServer);
     576      createButton->released.connect(this, &GameMenu::createMasterServer);
    577577    }
    578578  }
     
    593593
    594594  State::setOnline(true);
    595   NetworkManager::getInstance()->establishConnection( this->ipInputLine->_getText(), 9999 );
     595  NetworkManager::getInstance()->createClient( this->ipInputLine->_getText(), 9999 );
    596596
    597597  Preferences::getInstance()->setString( "multiplayer", "lastVisitedServer", this->ipInputLine->_getText() );
     
    600600}
    601601
    602 void GameMenu::createServer( )
     602void GameMenu::createMasterServer( )
    603603{
    604604  PRINTF(0)("Create server\n" );
    605605
    606606  State::setOnline(true);
    607   NetworkManager::getInstance()->createServer( 9999 );
     607  NetworkManager::getInstance()->createMasterServer( 9999 );
    608608
    609609  this->startLevel( 5 );
  • branches/proxy/src/story_entities/menu/game_menu.h

    r9059 r9396  
    5050   
    5151    void showServerMenu();
    52     void createServer();
     52    void createMasterServer();
    5353
    5454
  • branches/proxy/src/story_entities/multi_player_world_data.cc

    r9388 r9396  
    4747#include "player_stats.h"
    4848
    49 #include "proxy/proxy_settings.h"
     49#include "proxy/network_settings.h"
    5050
    5151#include "glmenu_imagescreen.h"
     
    112112  const TiXmlElement* element = NULL;
    113113
    114   if( NetworkManager::getInstance()->isMasterServer() )
     114  if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
    115115  {
    116116    /* load the spawning points */
     
    148148    element = element->FirstChildElement();
    149149
    150     if( NetworkManager::getInstance()->isMasterServer() )
     150    if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
    151151    {
    152152      while( element != NULL)
     
    206206
    207207
    208     if( NetworkManager::getInstance()->isMasterServer())
     208    if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
    209209    {
    210210      this->localPlayer = new Player();
     
    281281  GameWorldData::loadScene(root);
    282282
    283 //   LoadParamXML(root, "ProxySettings", ProxySettings::getInstance(), ProxySettings, loadProxySettings);
     283//   LoadParamXML(root, "NetworkSettings", NetworkSettings::getInstance(), NetworkSettings, loadNetworkSettings);
    284284
    285285  // create server playable
    286   if ( NetworkManager::getInstance()->isMasterServer() )
     286  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
    287287  {
    288288    NetworkGameManager::getInstance()->signalNewPlayer( 0 );
     
    300300{
    301301  // delete the proxy settings
    302   delete ProxySettings::getInstance();
     302  delete NetworkSettings::getInstance();
    303303
    304304  /* call underlying function */
Note: See TracChangeset for help on using the changeset viewer.