From 3d6517e02f1cc34227e3c910cf0ce2119a31cfb3 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 29 Nov 2023 23:57:10 -0600 Subject: [PATCH] Pause overworld map state while other menus are opened. --- Crawler/State_OverworldMap.cpp | 4 +++- Crawler/Version.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Crawler/State_OverworldMap.cpp b/Crawler/State_OverworldMap.cpp index 27cff8af..1724a4ec 100644 --- a/Crawler/State_OverworldMap.cpp +++ b/Crawler/State_OverworldMap.cpp @@ -73,6 +73,8 @@ void State_OverworldMap::OnStateChange(GameState*prevState){ Menu::OpenMenu(OVERWORLD_LEVEL_SELECT,false); }; void State_OverworldMap::OnUserUpdate(Crawler*game){ + if(Menu::stack.size()>1)return; + game->camera.SetTarget(currentConnectionPoint->rect.middle()+vf2d{game->GetScreenSize().x/6.0f,0}); game->UpdateCamera(game->GetElapsedTime()); game->GetPlayer()->Update(game->GetElapsedTime()); @@ -85,7 +87,7 @@ void State_OverworldMap::OnUserUpdate(Crawler*game){ } } - if(Crawler::KEY_MENU.Pressed()){ + if(Menu::stack.size()==1&&Crawler::KEY_MENU.Pressed()){ Menu::OpenMenu(OVERWORLD_MENU); } diff --git a/Crawler/Version.h b/Crawler/Version.h index 90101429..ddac4f3d 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 3326 +#define VERSION_BUILD 3330 #define stringify(a) stringify_(a) #define stringify_(a) #a