Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 27, 2008, 10:56:51 PM (16 years ago)
Author:
rgrieder
Message:
  • Added support for dedicated server. Could not network test it yet, client still segfaults me.
  • Also kicked GraphicsEngine::levelSceneManager_, there are only the statistic methods left.
  • GSDedicated also derives from GSLevel, but GSLevel is not anymore a real GameState.
  • CameraHandler and LevelManager get created in GSLevel now.
File:
1 edited

Legend:

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

    r2004 r2023  
    4040
    4141    GSClient::GSClient()
    42         : GSLevel("client")
     42        : GameState<GSGraphics>("client")
    4343        , client_(0)
    4444    {
     
    5353        Core::setIsClient(true);
    5454
    55         GSLevel::enter();
    56 
    5755        this->client_ = new network::Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));
    5856
     
    6058            ThrowException(InitialisationFailed, "Could not establish connection with server.");
    6159
     60        GSLevel::enter(this->getParent()->getViewport());
     61
    6262        client_->tick(0);
    63 
    64         // level is loaded: we can start capturing the input
    65         InputManager::getInstance().requestEnterState("game");
    6663    }
    6764
    6865    void GSClient::leave()
    6966    {
    70         InputManager::getInstance().requestLeaveState("game");
    71 
    72         // TODO: How do we unload the level in client mode?
     67        GSLevel::leave();
    7368
    7469        client_->closeConnection();
     
    7671        // destroy client
    7772        delete this->client_;
    78 
    79         GSLevel::leave();
    8073
    8174        Core::setIsClient(false);
Note: See TracChangeset for help on using the changeset viewer.