InGame keys: Go to mainMenu with M. Exit client with ESC. Fix drop in drop out correctly.

This commit is contained in:
Linda Andersson 2014-02-26 11:53:33 +01:00 committed by Dander7BD
parent d4e80733d2
commit 7d7d475499
1 changed files with 14 additions and 5 deletions

View File

@ -157,19 +157,28 @@ void GameState::InitiatePlayer( int id, const std::string &modelName, const floa
GameClientState::ClientState GameState::Update( float deltaTime ) GameClientState::ClientState GameState::Update( float deltaTime )
{ {
GameStateUI::UIState UIstate = this->currGameUI->Update( deltaTime ); GameStateUI::UIState UIstate = this->gameUI->Update( deltaTime );
switch (UIstate) switch (UIstate)
{ {
case DanBias::Client::GameStateUI::UIState_shut_down:
{
this->privData->nextState = ClientState_Quit;
// disconnect
}
break;
case DanBias::Client::GameStateUI::UIState_same: case DanBias::Client::GameStateUI::UIState_same:
break; break;
case DanBias::Client::GameStateUI::UIState_gaming: case DanBias::Client::GameStateUI::UIState_gaming:
break; break;
case DanBias::Client::GameStateUI::UIState_main_menu: case DanBias::Client::GameStateUI::UIState_main_menu:
//this->privData->nextState = {
break; this->privData->nextState = ClientState_Main;
case DanBias::Client::GameStateUI::UIState_shut_down: // disconnect
this->privData->nextState = ClientState_Quit; }
break; break;
default: default:
break; break;
} }