void TServerConnectState::Update(nel::TGameTime deltaTime) { TGameState::Update(deltaTime); IClient* client = (IClient*)Application->RetrieveInterface(IID_IClient); assert(client); client->Process(); switch (progress) { case SHOULDCONNECT: ConnectToServer(); progress = CONNECTING; break; case CONNECTING: if (client->IsConnected()) progress = CONNECTED; break; case CONNECTED: if (client->IsInLobby()) { progress = INLOBBY; Owner->SetNextState(SID_Lobby); } break; case INLOBBY: break; }; }