diff --git a/src/Client/Systems/Menus/Menu/MenuSystems.cpp b/src/Client/Systems/Menus/Menu/MenuSystems.cpp index 2f60047a..fe737e0f 100644 --- a/src/Client/Systems/Menus/Menu/MenuSystems.cpp +++ b/src/Client/Systems/Menus/Menu/MenuSystems.cpp @@ -236,15 +236,13 @@ namespace Systems { } Registry::getInstance().getClock().restart(clockId); switch (Scene::SceneManager::getInstance().getCurrentScene()) { - case MENU: Logger::fatal("in menu"); Scene::SceneManager::getInstance().stop(); break; + case MENU: Scene::SceneManager::getInstance().stop(); break; case CREATE_LOBBY_SCENE: - Logger::fatal("in select create lobby"); Scene::SceneManager::getInstance().changeScene(SELECT_LOBBY); break; - case SELECT_LOBBY: Logger::fatal("in select lobby"); Scene::SceneManager::getInstance().changeScene(MENU); break; - case CREATE_SERVER_SCENE: Logger::fatal("in create server"); Scene::SceneManager::getInstance().changeScene(MENU); break; + case SELECT_LOBBY: Scene::SceneManager::getInstance().changeScene(MENU); break; + case CREATE_SERVER_SCENE: Scene::SceneManager::getInstance().changeScene(MENU); break; case GAME: - Logger::fatal("in game"); Nitwork::NitworkClient::getInstance().disconnectLobby(); Types::WaveInfos::getInstance().reset(); Scene::SceneManager::getInstance().changeScene(SELECT_LOBBY); diff --git a/src/Game/ResourcesManager.hpp b/src/Game/ResourcesManager.hpp index 6e3ef564..9c72102d 100644 --- a/src/Game/ResourcesManager.hpp +++ b/src/Game/ResourcesManager.hpp @@ -185,8 +185,13 @@ class ResourcesManager { if (!ResourcesManager::isExists(path_tmp.string(), "share") || !ResourcesManager::isExists(path_tmp.string(), "bin")) { - Logger::fatal("RESOURCE_MANAGER: Path don't contain OK: " + path_tmp.string()); - return ResourcesManager::getRessourcePathNormal(pathFolderInit); + Logger::warn("RESOURCE_MANAGER: Path don't contain OK: " + path_tmp.string()); + path_tmp = path_tmp.parent_path(); + if (!ResourcesManager::isExists(path_tmp.string(), "share") + || !ResourcesManager::isExists(path_tmp.string(), "bin")) { + Logger::warn("RESOURCE_MANAGER: Path don't contain OK: " + path_tmp.string()); + return ResourcesManager::getRessourcePathNormal(pathFolderInit); + } } return path_tmp.string(); } @@ -196,7 +201,12 @@ class ResourcesManager { boost::filesystem::path path_tmp = pathFolderInit; if (!ResourcesManager::isExists(path_tmp.string(), "assets")) { - Logger::fatal("RESOURCE_MANAGER: Path don't contain OK: " + path_tmp.string()); + Logger::warn("RESOURCE_MANAGER: Path don't contain OK: " + path_tmp.string()); + path_tmp = path_tmp.parent_path(); + if (!ResourcesManager::isExists(path_tmp.string(), "assets")) { + Logger::warn("RESOURCE_MANAGER: Path don't contain OK: " + path_tmp.string()); + return ""; + } return ""; } return path_tmp.string();