[Solved] Problem with PagingLandScapeMeshDecal Factory

kungfoomasta

25-02-2007 09:42:15

In my Game I have separate systems with its own scene manager. An error is thrown when creating the second instance of PLSM2:

Ogre.log:

01:30:06: MovableObjectFactory for type 'PagingLandScapeMeshDecal' registered.
01:30:06: OGRE EXCEPTION(4:ItemIdentityException): A factory of type 'PagingLandScapeMeshDecal' already exists. in Root::addMovableObjectFactory at ..\src\OgreRoot.cpp (line 1034)


I don't know anything about creating and adding factories... Sklug, would you be able to help me out with this? I'm not sure what the solution would be..

Hope you can help me :)

KungFooMasta

kungfoomasta

25-02-2007 19:36:56

Fix:

OgrePagingLandScapeSceneManager.cpp:

PagingLandScapeSceneManager::PagingLandScapeSceneManager(const String& name) :
PagingLandScapeOctreeSceneManager(name),
mData2DManager (0),
mTextureManager (0),
mTileManager (0),
mRenderableManager (0),
mIndexesManager (0),
mTexCoordManager (0),
mPageManager (0),
mHorizon (0),
mNeedOptionsUpdate (false),
//JEFF
mWorldGeomIsSetup (false),
// TK
mWorldGeomIsInit (false),
mBrushSize (5),
mBrushScale (0.2f),
mImpactInfo (0),
mBrushCenter (Vector3::ZERO),
mBrushArray (0), mCraterArray(0),
mBrushArrayHeight (0),
mBrushArrayWidth (0),
mListenerManager(0),
mOptions(0),
textureFormatChanged (false)
{
//showBoundingBoxes(true);
//setDisplaySceneNodes(true);

// String PagingLandScapeMeshDecalFactory::FACTORY_TYPE_NAME = "PagingLandScapeMeshDecal";
mMeshDecalFactory = new PagingLandScapeMeshDecalFactory;
if( !(Root::getSingleton().hasMovableObjectFactory("PagingLandScapeMeshDecal")) )
Root::getSingleton().addMovableObjectFactory( mMeshDecalFactory );
}


KungFooMasta