From 7d7d4754996ef34da5795d24220596634c2333d4 Mon Sep 17 00:00:00 2001 From: Linda Andersson Date: Wed, 26 Feb 2014 11:53:33 +0100 Subject: [PATCH] InGame keys: Go to mainMenu with M. Exit client with ESC. Fix drop in drop out correctly. --- .../GameClient/GameClientState/GameState.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index f90bc0c7..4b3e7cb8 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -157,19 +157,28 @@ void GameState::InitiatePlayer( int id, const std::string &modelName, const floa GameClientState::ClientState GameState::Update( float deltaTime ) { - GameStateUI::UIState UIstate = this->currGameUI->Update( deltaTime ); + GameStateUI::UIState UIstate = this->gameUI->Update( deltaTime ); switch (UIstate) { + case DanBias::Client::GameStateUI::UIState_shut_down: + { + this->privData->nextState = ClientState_Quit; + // disconnect + } + + break; case DanBias::Client::GameStateUI::UIState_same: break; case DanBias::Client::GameStateUI::UIState_gaming: break; case DanBias::Client::GameStateUI::UIState_main_menu: - //this->privData->nextState = - break; - case DanBias::Client::GameStateUI::UIState_shut_down: - this->privData->nextState = ClientState_Quit; + { + this->privData->nextState = ClientState_Main; + // disconnect + } + break; + default: break; }