From 0da44f69ad78e8ec7db1f8a8deb94d2cc24be4ae Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 3 Nov 2017 06:36:20 +0800 Subject: [PATCH] [Server] Isolate getModFolder() & getDataFolder() --- apps/openmw-mp/Script/LuaState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw-mp/Script/LuaState.cpp b/apps/openmw-mp/Script/LuaState.cpp index 1a4184dde..ca6b7e9cd 100644 --- a/apps/openmw-mp/Script/LuaState.cpp +++ b/apps/openmw-mp/Script/LuaState.cpp @@ -285,11 +285,11 @@ sol::environment LuaState::openScript(std::string homePath, std::string modname) env["package"]["path"] = Utils::convertPath(homePath + "/mods/" + modname + "/?.lua") + ";" + package_path; package_path = env["package"]["path"]; - lua->set_function("getDataFolder", [homePath, modname]() -> const string { + env.set_function("getDataFolder", [homePath, modname]() -> const string { return homePath + "/data/" + modname + '/'; }); - lua->set_function("getModFolder", [homePath, modname]() -> const string{ + env.set_function("getModFolder", [homePath, modname]() -> const string { return homePath + "/mods/" + modname + '/'; });