From 72d1917c1f596804a8b08c7ad22ae2209974167e Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Thu, 28 Nov 2019 21:18:32 +0100 Subject: [PATCH] Fix missing script folder bug --- src/module/scripting.cpp | 9 ++++++++- src/module/steam_proxy.cpp | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/module/scripting.cpp b/src/module/scripting.cpp index 49333fa..9500e49 100644 --- a/src/module/scripting.cpp +++ b/src/module/scripting.cpp @@ -45,7 +45,14 @@ private: void load_scripts() { - const auto scripts = utils::io::list_files("open-iw5/scripts/"); + const auto script_dir = "open-iw5/scripts/"s; + + if(!utils::io::directory_exists(script_dir)) + { + return; + } + + const auto scripts = utils::io::list_files(script_dir); for (const auto& script : scripts) { diff --git a/src/module/steam_proxy.cpp b/src/module/steam_proxy.cpp index 60a31df..42991b2 100644 --- a/src/module/steam_proxy.cpp +++ b/src/module/steam_proxy.cpp @@ -27,11 +27,11 @@ public: { if (game::is_sp()) { - this->start_mod("Open-IW5 Singleplayer", 42680); + this->start_mod("\xF0\x9F\x90\x8D Open-IW5 Singleplayer", 42680); } else if (game::is_mp()) { - this->start_mod("Open-IW5 Multiplayer", 42690); + this->start_mod("\xF0\x9F\x90\x8D Open-IW5 Multiplayer", 42690); } } catch (std::exception& e)