Changeset 7727
- Timestamp:
- Dec 8, 2010, 1:49:39 PM (14 years ago)
- Location:
- code/branches/masterserver/src/orxonox
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/masterserver/src/orxonox/Main.cc
r7657 r7727 54 54 SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode"); 55 55 56 /* ADD masterserver command */ 57 SetCommandLineSwitch(masterserver).information("Start in masterserver mode"); 58 56 59 SetCommandLineArgument(generateDoc, "") 57 60 .information("Generates a Doxygen file from things like SetConsoleCommand"); … … 67 70 if (CommandLineParser::getValue("generateDoc").getString().empty()) 68 71 { 72 /* TODO make this clear */ 69 73 game->setStateHierarchy( 70 74 "root" … … 75 79 " server,client" 76 80 " level" 81 " masterserver" 77 82 ); 78 83 … … 90 95 else if (CommandLineParser::getValue("dedicatedClient").getBool()) 91 96 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"); 94 100 else 95 101 { -
code/branches/masterserver/src/orxonox/gamestates/GSMasterServer.cc
r7725 r7727 21 21 * 22 22 * Author: 23 * Reto Grieder23 * Sandro 'smerkli' Merkli 24 24 * Co-authors: 25 * Fabian 'x3n' Landau 25 * Reto Grieder (original file for GSServer.cc) 26 * Fabian 'x3n' Landau (original file for GSServer.cc) 26 27 * 27 28 */ 28 29 29 #include "GS Server.h"30 #include "GSMasterServer.h" 30 31 31 32 #include "util/Debug.h" … … 37 38 namespace orxonox 38 39 { 39 DeclareGameState(GS Server, "server", false, false);40 DeclareGameState(GSMasterServer, "masterserver", false, false); 40 41 41 SetCommandLineArgument(port, 555 56).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)"); 42 43 43 GS Server::GSServer(const GameStateInfo& info)44 GSMasterServer::GSMasterServer(const GameStateInfo& info) 44 45 : GameState(info) 45 46 , server_(0) … … 47 48 } 48 49 49 GS Server::~GSServer()50 GSMasterServer::~GSMasterServer() 50 51 { 51 52 } 52 53 53 void GS Server::activate()54 void GSMasterServer::activate() 54 55 { 55 56 GameMode::setIsServer(true); … … 61 62 } 62 63 63 void GS Server::deactivate()64 void GSMasterServer::deactivate() 64 65 { 65 66 this->server_->close(); … … 69 70 } 70 71 71 void GS Server::update(const Clock& time)72 void GSMasterServer::update(const Clock& time) 72 73 { 73 74 server_->update(time); -
code/branches/masterserver/src/orxonox/gamestates/GSMasterServer.h
r7725 r7727 21 21 * 22 22 * Author: 23 * Reto Grieder23 * Sandro 'smerkli' Merkli 24 24 * Co-authors: 25 * Reto Grieder (Original GSServer.h file this was adapted from) 25 26 * ... 26 27 * 27 28 */ 28 29 29 #ifndef _GS Server_H__30 #define _GS Server_H__30 #ifndef _GSMasterServer_H__ 31 #define _GSMasterServer_H__ 31 32 32 33 #include "OrxonoxPrereqs.h" … … 37 38 namespace orxonox 38 39 { 39 class _OrxonoxExport GS Server : public GameState40 class _OrxonoxExport GSMasterServer : public GameState 40 41 { 41 42 public: 42 GS Server(const GameStateInfo& info);43 ~GS Server();43 GSMasterServer(const GameStateInfo& info); 44 ~GSMasterServer(); 44 45 45 46 void activate(); … … 48 49 49 50 private: 50 Server* server_;51 51 52 }; 52 53 }
Note: See TracChangeset
for help on using the changeset viewer.