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/GSServer.cc

    r2171 r2896  
    3131
    3232#include "core/CommandLine.h"
    33 #include "core/Core.h"
     33#include "core/Game.h"
     34#include "core/GameMode.h"
    3435#include "network/Server.h"
    3536
    3637namespace orxonox
    3738{
     39    AddGameState(GSServer, "server");
     40
    3841    SetCommandLineArgument(port, 55556).shortcut("p").information("0-65535");
    3942
    40     GSServer::GSServer()
    41         : GameState<GSGraphics>("server")
     43    GSServer::GSServer(const std::string& name)
     44        : GameState(name)
    4245        , server_(0)
    4346    {
     
    4851    }
    4952
    50     void GSServer::enter()
     53    void GSServer::activate()
    5154    {
    52         Core::setHasServer(true);
     55        GameMode::setHasServer(true);
    5356
    5457        this->server_ = new Server(CommandLine::getValue("port"));
    5558        COUT(0) << "Loading scene in server mode" << std::endl;
    5659
    57         GSLevel::enter(this->getParent()->getViewport());
    58 
    5960        server_->open();
    6061    }
    6162
    62     void GSServer::leave()
     63    void GSServer::deactivate()
    6364    {
    64         GSLevel::leave();
    65 
    6665        this->server_->close();
    6766        delete this->server_;
    6867
    69         Core::setHasServer(false);
     68        GameMode::setHasServer(false);
    7069    }
    7170
    72     void GSServer::ticked(const Clock& time)
     71    void GSServer::update(const Clock& time)
    7372    {
    74         GSLevel::ticked(time);
    75         server_->tick(time.getDeltaTime());
    76         this->tickChild(time);
     73        server_->update(time);
    7774    }
    7875}
Note: See TracChangeset for help on using the changeset viewer.