diff --git a/Crawler/GameState.h b/Crawler/GameState.h index 9a71578b..59152d5f 100644 --- a/Crawler/GameState.h +++ b/Crawler/GameState.h @@ -1,8 +1,9 @@ #pragma once #include #include +#include "Crawler.h" -class Crawler; +INCLUDE_game namespace States{ enum State{ @@ -27,6 +28,7 @@ public: throw; } STATE=states.at(newState); + game->camera.SetTarget(game->GetPlayer()->GetPos()); STATE->OnStateChange(prevState); } }; \ No newline at end of file diff --git a/Crawler/Menu.cpp b/Crawler/Menu.cpp index 99c504eb..458fd682 100644 --- a/Crawler/Menu.cpp +++ b/Crawler/Menu.cpp @@ -642,9 +642,5 @@ std::pairMenu::GetMemoryLeakReportInfo(){ } void Menu::CloseAllMenus(){ - if(stack.size()<=0){ - std::cout<<"WARNING! Trying to close out no menu?? Why are we doing this?"<