Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2009, 1:59:00 AM (15 years ago)
Author:
landauf
Message:

Merged gui branch back to trunk.

I did 2 small changes in IngameManager.cc on line 777 and 888 (yes, really), because const_reverse_iterator strangely doesn't work on MinGW.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gamestates/GSClient.cc

    r2171 r2896  
    3131
    3232#include "core/input/InputManager.h"
     33#include "core/Clock.h"
    3334#include "core/CommandLine.h"
    34 #include "core/Core.h"
     35#include "core/Game.h"
     36#include "core/GameMode.h"
    3537#include "network/Client.h"
    3638
    3739namespace orxonox
    3840{
     41    AddGameState(GSClient, "client");
     42
    3943    SetCommandLineArgument(ip, "127.0.0.1").information("#.#.#.#");
    4044
    41     GSClient::GSClient()
    42         : GameState<GSGraphics>("client")
     45    GSClient::GSClient(const std::string& name)
     46        : GameState(name)
    4347        , client_(0)
    4448    {
     
    4953    }
    5054
    51     void GSClient::enter()
     55    void GSClient::activate()
    5256    {
    53         Core::setIsClient(true);
     57        GameMode::setIsClient(true);
    5458
    5559        this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));
     
    5862            ThrowException(InitialisationFailed, "Could not establish connection with server.");
    5963
    60         GSLevel::enter(this->getParent()->getViewport());
    61 
    62         client_->tick(0);
     64        client_->update(Game::getInstance().getGameClock());
    6365    }
    6466
    65     void GSClient::leave()
     67    void GSClient::deactivate()
    6668    {
    67         GSLevel::leave();
    68 
    6969        client_->closeConnection();
    7070
     
    7272        delete this->client_;
    7373
    74         Core::setIsClient(false);
     74        GameMode::setIsClient(false);
    7575    }
    7676
    77     void GSClient::ticked(const Clock& time)
     77    void GSClient::update(const Clock& time)
    7878    {
    79         GSLevel::ticked(time);
    80         client_->tick(time.getDeltaTime());
    81 
    82         this->tickChild(time);
     79        client_->update(time);
    8380    }
    8481}
Note: See TracChangeset for help on using the changeset viewer.