Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIENT-GAME: Fix redsource on windows #144

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/Client/Systems/Menus/Menu/MenuSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 13 additions & 3 deletions src/Game/ResourcesManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();
Expand Down
Loading