diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 244c63e51..6725497c1 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -296,6 +296,7 @@ void OMW::Engine::loadBSA() std::cout << "Adding " << iter->second.string() << std::endl; addBSA (iter->second.string()); } + } // add resources directory diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index bb5578f6d..2b5bbbc4d 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -118,6 +118,8 @@ namespace MWClass Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75); if (groin){ + cellRender.insertMesh("bald_MJ_hat.NIF"); //w/W_6th_Hammer.NIF + //bald_MJ_hat.NIF cellRender.insertMesh("meshes\\" + groin->model, pos2, axis, kOgrePi, npcName + "groin", addresses, numbers); addresses2[numbers] = npcName + "groin"; addresses[numbers++] = npcName + "groin"; diff --git a/apps/openmw/mwrender/interior.cpp b/apps/openmw/mwrender/interior.cpp index d3ec9b442..09cce2f6d 100644 --- a/apps/openmw/mwrender/interior.cpp +++ b/apps/openmw/mwrender/interior.cpp @@ -200,8 +200,10 @@ Ogre::Entity* InteriorCellRender::insertAndDeliverMesh(const std::string &mesh) void InteriorCellRender::insertMesh(const std::string &mesh) { assert (insert); - - NIFLoader::load(mesh); + //if(mesh == "\\Meshes\\bald_MJ_hat.NIF") + // NIFLoader::load(mesh, ""); + //else + NIFLoader::load(mesh); MovableObject *ent = scene.getMgr()->createEntity(mesh); insert->attachObject(ent); diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp index 4691eb546..643845e25 100644 --- a/components/bsa/bsa_archive.cpp +++ b/components/bsa/bsa_archive.cpp @@ -145,6 +145,7 @@ public: void destroyInstance( Archive* arch) { delete arch; } }; + static bool init = false; static void insertBSAFactory() { @@ -163,3 +164,8 @@ void addBSA(const std::string& name, const std::string& group) ResourceGroupManager::getSingleton(). addResourceLocation(name, "BSA", group); } +void addDir(const std::string& name, const std::string& group) +{ + ResourceGroupManager::getSingleton(). + addResourceLocation(name, "FileSystem", group); +} diff --git a/components/bsa/bsa_archive.hpp b/components/bsa/bsa_archive.hpp index bde6d9c3b..91fd2fe98 100644 --- a/components/bsa/bsa_archive.hpp +++ b/components/bsa/bsa_archive.hpp @@ -29,5 +29,6 @@ /// Add the given BSA file as an input archive in the Ogre resource /// system. void addBSA(const std::string& file, const std::string& group="General"); +void addDir(const std::string& file, const std::string& group="General"); #endif diff --git a/components/files/multidircollection.hpp b/components/files/multidircollection.hpp index bd0304e40..3f9ddad84 100644 --- a/components/files/multidircollection.hpp +++ b/components/files/multidircollection.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -21,11 +22,12 @@ namespace Files return left