From 86b0fcf67aadc0d313253befb0590d00efd085bc Mon Sep 17 00:00:00 2001 From: Naios Date: Mon, 18 Apr 2016 20:29:42 +0200 Subject: Core/Scripting: Use the path of the worldserver executable to search for the scripts dir * Fixes issues when starting the worldserver not in the bin directory or the CMAKE_INSTALL_PREFIX directory using the -c option. --- src/common/Configuration/Config.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common/Configuration/Config.cpp') diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index ddaab7dee61..888aa6ecef3 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -25,11 +25,13 @@ using namespace boost::property_tree; -bool ConfigMgr::LoadInitial(std::string const& file, std::string& error) +bool ConfigMgr::LoadInitial(std::string const& file, std::vector args, + std::string& error) { std::lock_guard lock(_configLock); _filename = file; + _args = args; try { @@ -65,7 +67,7 @@ ConfigMgr* ConfigMgr::instance() bool ConfigMgr::Reload(std::string& error) { - return LoadInitial(_filename, error); + return LoadInitial(_filename, std::move(_args), error); } template -- cgit v1.2.3