- Timestamp:
- Oct 27, 2008, 10:56:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.cc
r2004 r2023 40 40 41 41 GSClient::GSClient() 42 : G SLevel("client")42 : GameState<GSGraphics>("client") 43 43 , client_(0) 44 44 { … … 53 53 Core::setIsClient(true); 54 54 55 GSLevel::enter();56 57 55 this->client_ = new network::Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); 58 56 … … 60 58 ThrowException(InitialisationFailed, "Could not establish connection with server."); 61 59 60 GSLevel::enter(this->getParent()->getViewport()); 61 62 62 client_->tick(0); 63 64 // level is loaded: we can start capturing the input65 InputManager::getInstance().requestEnterState("game");66 63 } 67 64 68 65 void GSClient::leave() 69 66 { 70 InputManager::getInstance().requestLeaveState("game"); 71 72 // TODO: How do we unload the level in client mode? 67 GSLevel::leave(); 73 68 74 69 client_->closeConnection(); … … 76 71 // destroy client 77 72 delete this->client_; 78 79 GSLevel::leave();80 73 81 74 Core::setIsClient(false);
Note: See TracChangeset
for help on using the changeset viewer.