Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6096 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Dec 14, 2005, 2:12:30 AM (19 years ago)
Author:
patrick
Message:

network: server/client mode loading

Location:
branches/network/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_manager.cc

    r6095 r6096  
    5050  this->tmpStream = NULL;
    5151  this->hostID = -1;
     52  this->bGameServer = false;
    5253
    5354  PRINTF(0)("NetworkManager created\n");
  • branches/network/src/orxonox.cc

    r6095 r6096  
    353353  this->gameLoader = GameLoader::getInstance();
    354354
    355   if( this->serverName != NULL)
    356     this->gameLoader->loadNetworkCampaign("worlds/DefaultCampaign.oxc", NET_CLIENT);    /* start as client */
    357   else if( this->port != -1)
    358     this->gameLoader->loadNetworkCampaign("worlds/DefaultCampaign.oxc", NET_SERVER);    /* start as server */
     355  if( this->port != -1)
     356    this->gameLoader->loadNetworkCampaign("worlds/DefaultNetworkCampaign.oxc");
    359357  else
    360358    this->gameLoader->loadCampaign("worlds/DefaultCampaign.oxc");                       /* start orxonox in single player mode */
  • branches/network/src/story_entities/campaign.cc

    r5982 r6096  
    150150      delete (*it);
    151151    }
     152    PRINTF(1)("There is no StoryEnity left to play, quitting\n");
    152153}
    153154
  • branches/network/src/story_entities/network_world.cc

    r6095 r6096  
    7575
    7676
    77 //SHELL_COMMAND(speed, NetworkWorld, setSpeed);
    78 //SHELL_COMMAND(togglePNodeVisibility, NetworkWorld, togglePNodeVisibility);
    79 //SHELL_COMMAND(toggleBVVisibility, NetworkWorld, toggleBVVisibility);
     77SHELL_COMMAND(speed, NetworkWorld, setSpeed);
     78SHELL_COMMAND(togglePNodeVisibility, NetworkWorld, togglePNodeVisibility);
     79SHELL_COMMAND(toggleBVVisibility, NetworkWorld, toggleBVVisibility);
    8080
    8181using namespace std;
    8282
    8383//! This creates a Factory to fabricate a NetworkWorld
    84 //CREATE_FACTORY(NetworkWorld, CL_WORLD);
     84CREATE_FACTORY(NetworkWorld, CL_WORLD);
    8585
    8686NetworkWorld::NetworkWorld(const TiXmlElement* root)
     
    341341  // find WorldEntities //
    342342  ////////////////////////
    343   if( NetworkManager::getInstance()->isGameServer())
     343  if( /*NetworkManager::getInstance()->isGameServer()*/1)
    344344  {
    345345    element = root->FirstChildElement("WorldEntities");
  • branches/network/src/util/loading/game_loader.cc

    r6064 r6096  
    122122 * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
    123123 */
    124 ErrorMessage GameLoader::loadNetworkCampaign(const char* fileName, int nodeState)
     124ErrorMessage GameLoader::loadNetworkCampaign(const char* fileName)
    125125{
    126126  ErrorMessage errorCode;
     
    128128  if (campaignName)
    129129  {
    130     this->currentCampaign = this->fileToNetworkCampaign(campaignName, nodeState);
     130    this->currentCampaign = this->fileToNetworkCampaign(campaignName);
    131131    delete[] campaignName;
    132132  }
     
    296296 *  this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
    297297 */
    298 Campaign* GameLoader::fileToNetworkCampaign(const char* fileName, int nodeState)
     298Campaign* GameLoader::fileToNetworkCampaign(const char* fileName)
    299299{
    300300  /* do not entirely load the campaign. just the current world
  • branches/network/src/util/loading/game_loader.h

    r6063 r6096  
    5555  ErrorMessage loadCampaign(const char* name);
    5656  ErrorMessage loadDebugCampaign(Uint32 campaignID);
    57   ErrorMessage loadNetworkCampaign(const char* fileName, int nodeState);
     57  ErrorMessage loadNetworkCampaign(const char* fileName);
    5858
    5959  void nextLevel();
     
    6767
    6868  Campaign* fileToCampaign(const char* name);
    69   Campaign* fileToNetworkCampaign(const char* fileName, int nodeState);
     69  Campaign* fileToNetworkCampaign(const char* fileName);
    7070
    7171
Note: See TracChangeset for help on using the changeset viewer.