Fix missing script folder bug

This commit is contained in:
Maurice Heumann 2019-11-28 21:18:32 +01:00
parent 214719ff37
commit 72d1917c1f
2 changed files with 10 additions and 3 deletions

View File

@ -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)
{

View File

@ -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)