1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Cosmetic changes

This commit is contained in:
Nicolay Korslund 2010-01-13 19:28:12 +01:00
parent 31d971e076
commit 14b91fb271
2 changed files with 9 additions and 0 deletions

View file

@ -164,5 +164,13 @@ void NIFLoader::loadResource(Resource *resource)
MeshPtr NIFLoader::load(const char* name, const char* group)
{
MeshManager *m = MeshManager::getSingletonPtr();
// Check if the resource already exists
ResourcePtr ptr = m->getByName(name/*, group*/);
if(!ptr.isNull())
return MeshPtr(ptr);
// Nope, create a new one.
return MeshManager::getSingleton().createManual(name, group, &g_sing);
}

View file

@ -75,6 +75,7 @@ int main(int argc, char**args)
// Insert the mesh
const char* mesh = "meshes\\a\\towershield_steel.nif";
NIFLoader::load(mesh);
NIFLoader::load(mesh);
// Display it
SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("node");