Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7727


Ignore:
Timestamp:
Dec 8, 2010, 1:49:39 PM (14 years ago)
Author:
smerkli
Message:

Before conversion of masterserver from module to library

Location:
code/branches/masterserver/src/orxonox
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/masterserver/src/orxonox/Main.cc

    r7657 r7727  
    5454    SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode");
    5555
     56    /* ADD masterserver command */
     57    SetCommandLineSwitch(masterserver).information("Start in masterserver mode");
     58
    5659    SetCommandLineArgument(generateDoc, "")
    5760        .information("Generates a Doxygen file from things like SetConsoleCommand");
     
    6770        if (CommandLineParser::getValue("generateDoc").getString().empty())
    6871        {
     72            /* TODO make this clear */
    6973            game->setStateHierarchy(
    7074            "root"
     
    7579            " server,client"
    7680            "  level"
     81            " masterserver"
    7782            );
    7883
     
    9095            else if (CommandLineParser::getValue("dedicatedClient").getBool())
    9196                Game::getInstance().requestStates("client, level");
    92             //else if (CommandLineParser::getValue("masterserver").getBool())
    93                 //Game::getInstance().requestStates("client, level");
     97            /* ADD masterserver command */
     98            else if (CommandLineParser::getValue("masterserver").getBool())
     99                Game::getInstance().requestStates("masterserver");
    94100            else
    95101            {
  • code/branches/masterserver/src/orxonox/gamestates/GSMasterServer.cc

    r7725 r7727  
    2121 *
    2222 *   Author:
    23  *      Reto Grieder
     23 *      Sandro 'smerkli' Merkli
    2424 *   Co-authors:
    25  *      Fabian 'x3n' Landau
     25 *      Reto Grieder (original file for GSServer.cc)
     26 *      Fabian 'x3n' Landau (original file for GSServer.cc)
    2627 *
    2728 */
    2829
    29 #include "GSServer.h"
     30#include "GSMasterServer.h"
    3031
    3132#include "util/Debug.h"
     
    3738namespace orxonox
    3839{
    39     DeclareGameState(GSServer, "server", false, false);
     40    DeclareGameState(GSMasterServer, "masterserver", false, false);
    4041
    41     SetCommandLineArgument(port, 55556).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)");
     42    SetCommandLineArgument(port, 55566).shortcut("p").information("Network communication port to be used 0-65535 (default: 55566)");
    4243
    43     GSServer::GSServer(const GameStateInfo& info)
     44    GSMasterServer::GSMasterServer(const GameStateInfo& info)
    4445        : GameState(info)
    4546        , server_(0)
     
    4748    }
    4849
    49     GSServer::~GSServer()
     50    GSMasterServer::~GSMasterServer()
    5051    {
    5152    }
    5253
    53     void GSServer::activate()
     54    void GSMasterServer::activate()
    5455    {
    5556        GameMode::setIsServer(true);
     
    6162    }
    6263
    63     void GSServer::deactivate()
     64    void GSMasterServer::deactivate()
    6465    {
    6566        this->server_->close();
     
    6970    }
    7071
    71     void GSServer::update(const Clock& time)
     72    void GSMasterServer::update(const Clock& time)
    7273    {
    7374        server_->update(time);
  • code/branches/masterserver/src/orxonox/gamestates/GSMasterServer.h

    r7725 r7727  
    2121 *
    2222 *   Author:
    23  *      Reto Grieder
     23 *      Sandro 'smerkli' Merkli
    2424 *   Co-authors:
     25 *      Reto Grieder (Original GSServer.h file this was adapted from)
    2526 *      ...
    2627 *
    2728 */
    2829
    29 #ifndef _GSServer_H__
    30 #define _GSServer_H__
     30#ifndef _GSMasterServer_H__
     31#define _GSMasterServer_H__
    3132
    3233#include "OrxonoxPrereqs.h"
     
    3738namespace orxonox
    3839{
    39     class _OrxonoxExport GSServer : public GameState
     40    class _OrxonoxExport GSMasterServer : public GameState
    4041    {
    4142    public:
    42         GSServer(const GameStateInfo& info);
    43         ~GSServer();
     43        GSMasterServer(const GameStateInfo& info);
     44        ~GSMasterServer();
    4445
    4546        void activate();
     
    4849
    4950    private:
    50         Server* server_;
     51       
    5152    };
    5253}
Note: See TracChangeset for help on using the changeset viewer.