Changeset 7163 for code/trunk/src/orxonox/gamestates
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSClient.cc
r6426 r7163 40 40 DeclareGameState(GSClient, "client", false, false); 41 41 42 SetCommandLineArgument( ip, "127.0.0.1").information("Sever IP as string in the form #.#.#.#");42 SetCommandLineArgument(dest, "127.0.0.1").information("Server hostname/IP (IP in the form of #.#.#.#)"); 43 43 44 44 GSClient::GSClient(const GameStateInfo& info) 45 45 : GameState(info) 46 , client_(0)47 46 { 48 47 } … … 56 55 GameMode::setIsClient(true); 57 56 58 this->client_ = new Client(CommandLineParser::getValue("ip").getString(), CommandLineParser::getValue("port")); 57 // this->client_ = new Client(); 58 // this->client_->setDestination(CommandLineParser::getValue("dest").getString(), CommandLineParser::getValue("port") ); 59 59 60 if( !client_->establishConnection())60 if( !Client::getInstance()->establishConnection() ) 61 61 { 62 delete this->client_;63 62 ThrowException(InitialisationFailed, "Could not establish connection with server."); 64 63 } 65 64 66 client_->update(Game::getInstance().getGameClock());65 Client::getInstance()->update(Game::getInstance().getGameClock()); 67 66 } 68 67 69 68 void GSClient::deactivate() 70 69 { 71 client_->closeConnection();70 Client::getInstance()->closeConnection(); 72 71 73 72 // destroy client 74 delete this->client_;73 // delete this->client_; 75 74 76 75 GameMode::setIsClient(false); … … 79 78 void GSClient::update(const Clock& time) 80 79 { 81 client_->update(time);80 Client::getInstance()->update(time); 82 81 } 83 82 } -
code/trunk/src/orxonox/gamestates/GSClient.h
r5929 r7163 46 46 void deactivate(); 47 47 void update(const Clock& time); 48 49 private:50 Client* client_;51 48 }; 52 49 } -
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r6417 r7163 39 39 #include "core/Game.h" 40 40 #include "core/GUIManager.h" 41 // HACK:42 #include "overlays/Map.h"43 41 44 42 namespace orxonox … … 73 71 void GSGraphics::deactivate() 74 72 { 75 // HACK: (destroys a resource smart pointer) 76 Map::hackDestroyMap(); 73 77 74 } 78 75
Note: See TracChangeset
for help on using the changeset viewer.