Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2010, 8:29:32 PM (14 years ago)
Author:
scheusso
Message:

some new features:
-Orxonox servers announce themselves now inside a LAN (and can provide some information (e.g. server name, etc.) to the client )
-Orxonox clients discover the servers inside the LAN and list them in the menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/gamestates/GSClient.cc

    r7122 r7161  
    4444    GSClient::GSClient(const GameStateInfo& info)
    4545        : GameState(info)
    46         , client_(0)
    4746    {
    4847    }
     
    5655        GameMode::setIsClient(true);
    5756
    58         this->client_ = new Client(CommandLineParser::getValue("dest").getString(), CommandLineParser::getValue("port"));
     57//         this->client_ = new Client();
     58//         this->client_->setDestination(CommandLineParser::getValue("dest").getString(), CommandLineParser::getValue("port") );
    5959
    60         if(!client_->establishConnection())
     60        if( !Client::getInstance()->establishConnection() )
    6161        {
    62             delete this->client_;
    6362            ThrowException(InitialisationFailed, "Could not establish connection with server.");
    6463        }
    6564
    66         client_->update(Game::getInstance().getGameClock());
     65        Client::getInstance()->update(Game::getInstance().getGameClock());
    6766    }
    6867
    6968    void GSClient::deactivate()
    7069    {
    71         client_->closeConnection();
     70        Client::getInstance()->closeConnection();
    7271
    7372        // destroy client
    74         delete this->client_;
     73//         delete this->client_;
    7574
    7675        GameMode::setIsClient(false);
     
    7978    void GSClient::update(const Clock& time)
    8079    {
    81         client_->update(time);
     80        Client::getInstance()->update(time);
    8281    }
    8382}
Note: See TracChangeset for help on using the changeset viewer.