Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5972 in orxonox.OLD for branches/network/src/orxonox.cc


Ignore:
Timestamp:
Dec 7, 2005, 4:59:24 PM (20 years ago)
Author:
patrick
Message:

network: started renice work on the game_load, making it network friendly:D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/orxonox.cc

    r5971 r5972  
    8383
    8484  /* this way, there is no network enabled: */
    85   this->clientName = NULL;
     85  this->serverName = NULL;
    8686  this->port = -1;
    8787
     
    190190  this->argv = argv;
    191191
    192   this->clientName = name;
     192  this->serverName = name;
    193193  this->port = port;
    194194
     
    278278  PRINT(3)("> Initializing networking\n");
    279279
    280   if( this->clientName != NULL) // we are a client
    281     NetworkManager::getInstance()->establishConnection(this->clientName, port);
     280  if( this->serverName != NULL) // we are a client
     281    NetworkManager::getInstance()->establishConnection(this->serverName, port);
    282282  else if( this->port > 0)      // we are a server
    283283    NetworkManager::getInstance()->createServer(port);
     
    351351
    352352  this->gameLoader = GameLoader::getInstance();
    353   this->gameLoader->loadCampaign("worlds/DefaultCampaign.oxc");
     353 
     354  if( this->port == -1 || this->serverName != NULL)
     355    this->gameLoader->loadNetworkCampaign("worlds/DefaultNetworkCampaign.oxc");
     356  else
     357    this->gameLoader->loadCampaign("worlds/DefaultCampaign.oxc");
     358 
    354359  //  this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0);
    355360  this->gameLoader->init();
Note: See TracChangeset for help on using the changeset viewer.