Changeset 2003 for code/branches/objecthierarchy/src/orxonox/gamestates
- Timestamp:
- Oct 24, 2008, 12:43:13 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/gamestates
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.cc
r1949 r2003 37 37 namespace orxonox 38 38 { 39 SetCommandLineArgument(ip, "127.0.0.1"). setInformation("#.#.#.#");39 SetCommandLineArgument(ip, "127.0.0.1").information("#.#.#.#"); 40 40 41 41 GSClient::GSClient() … … 55 55 GSLevel::enter(); 56 56 57 int serverPort = CommandLine::getArgument<int>("port")->getValue(); 58 std::string serverIP = CommandLine::getArgument<std::string>("ip")->getValue(); 59 this->client_ = new network::Client(serverIP, serverPort); 57 this->client_ = new network::Client((std::string)CommandLine::getValue("ip"), CommandLine::getValue("port")); 60 58 61 59 if(!client_->establishConnection()) -
code/branches/objecthierarchy/src/orxonox/gamestates/GSDedicated.cc
r1949 r2003 70 70 timeFactor_ = 1.0f; 71 71 72 int serverPort = CommandLine::getArgument<int>("port")->getValue(); 73 this->server_ = new network::Server(serverPort); 72 this->server_ = new network::Server(CommandLine::getValue("port")); 74 73 75 74 // call the loader -
code/branches/objecthierarchy/src/orxonox/gamestates/GSRoot.cc
r1891 r2003 61 61 namespace orxonox 62 62 { 63 SetCommandLineArgument(dataPath, ""). setInformation("PATH");64 SetCommandLineArgument(limitToCPU, 1). setInformation("0: off | #cpu");63 SetCommandLineArgument(dataPath, "").information("PATH"); 64 SetCommandLineArgument(limitToCPU, 1).information("0: off | #cpu"); 65 65 66 66 GSRoot::GSRoot() … … 91 91 this->settings_ = new Settings(); 92 92 93 std::string dataPath; 94 CommandLine::getValue("dataPath", &dataPath); 93 std::string dataPath = CommandLine::getValue("dataPath"); 95 94 if (dataPath != "") 96 95 { … … 111 110 // do this after ogre has initialised. Somehow Ogre changes the settings again (not through 112 111 // the timer though). 113 int limitToCPU; 114 CommandLine::getValue("limitToCPU", &limitToCPU); 112 int limitToCPU = CommandLine::getValue("limitToCPU"); 115 113 if (limitToCPU > 0) 116 114 setThreadAffinity((unsigned int)(limitToCPU - 1)); -
code/branches/objecthierarchy/src/orxonox/gamestates/GSServer.cc
r1949 r2003 38 38 namespace orxonox 39 39 { 40 SetCommandLineArgument(port, 55556).s etShortcut("p").setInformation("0-65535");40 SetCommandLineArgument(port, 55556).shortcut("p").information("0-65535"); 41 41 42 42 GSServer::GSServer() … … 56 56 GSLevel::enter(); 57 57 58 int serverPort = CommandLine::getArgument<int>("port")->getValue(); 59 this->server_ = new network::Server(serverPort); 58 this->server_ = new network::Server(CommandLine::getValue("port")); 60 59 COUT(0) << "Loading scene in server mode" << std::endl; 61 60
Note: See TracChangeset
for help on using the changeset viewer.