From 8cb8481b3720dc3d3f1eee496bd14cc20b9c8611 Mon Sep 17 00:00:00 2001 From: Jan-Peter Nilsson Date: Sun, 9 Jan 2011 13:26:08 +0100 Subject: [PATCH] Use a local plugins.cfg if available (allow us to run without installing) --- apps/openmw/engine.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 5c26a0a82..3eaff2fe1 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -312,7 +312,12 @@ void OMW::Engine::go() std::string plugCfg = "plugins.cfg"; std::string ogreCfg = "ogre.cfg"; ogreCfg.insert(0, cfgUserDir); - plugCfg.insert(0, cfgDir); + + //A local plugins.cfg will be used if it exist, otherwise look in the default path + if(!isFile(plugCfg.c_str())) + { + plugCfg.insert(0, cfgDir); + } mOgre.configure(!isFile(ogreCfg.c_str()), cfgUserDir, plugCfg, false);