mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 06:39:42 +00:00
part 2
This commit is contained in:
parent
00a2de432a
commit
867fb620c3
3 changed files with 15 additions and 2 deletions
|
@ -70,7 +70,6 @@ BulletShapeManager *BulletShapeManager::sThis = 0;
|
|||
|
||||
BulletShapeManager *BulletShapeManager::getSingletonPtr()
|
||||
{
|
||||
assert(sThis);
|
||||
return sThis;
|
||||
}
|
||||
|
||||
|
@ -82,6 +81,9 @@ BulletShapeManager &BulletShapeManager::getSingleton()
|
|||
|
||||
BulletShapeManager::BulletShapeManager()
|
||||
{
|
||||
assert(!sThis);
|
||||
sThis = this;
|
||||
|
||||
mResourceType = "BulletShape";
|
||||
|
||||
// low, because it will likely reference other resources
|
||||
|
@ -95,6 +97,8 @@ BulletShapeManager::~BulletShapeManager()
|
|||
{
|
||||
// and this is how we unregister it
|
||||
Ogre::ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
|
||||
|
||||
sThis = 0;
|
||||
}
|
||||
|
||||
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
|
||||
|
|
|
@ -120,6 +120,14 @@ protected:
|
|||
|
||||
static BulletShapeManager *sThis;
|
||||
|
||||
private:
|
||||
/** \brief Explicit private copy constructor. This is a forbidden operation.*/
|
||||
BulletShapeManager(const BulletShapeManager &);
|
||||
|
||||
/** \brief Private operator= . This is a forbidden operation. */
|
||||
BulletShapeManager& operator=(const BulletShapeManager &);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
BulletShapeManager();
|
||||
|
|
|
@ -251,7 +251,6 @@ namespace Physic
|
|||
|
||||
PhysicEngine::~PhysicEngine()
|
||||
{
|
||||
|
||||
HeightFieldContainer::iterator hf_it = mHeightFieldMap.begin();
|
||||
for (; hf_it != mHeightFieldMap.end(); ++hf_it)
|
||||
{
|
||||
|
@ -293,6 +292,8 @@ namespace Physic
|
|||
delete broadphase;
|
||||
delete pairCache;
|
||||
delete mShapeLoader;
|
||||
|
||||
delete BulletShapeManager::getSingletonPtr();
|
||||
}
|
||||
|
||||
void PhysicEngine::addHeightField(float* heights,
|
||||
|
|
Loading…
Reference in a new issue