mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 02:45:31 +00:00
Don't create a BulletShapeInstance for actors
This commit is contained in:
parent
246566cef4
commit
3552b3a82c
3 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ namespace MWPhysics
|
|||
{
|
||||
|
||||
|
||||
Actor::Actor(const MWWorld::Ptr& ptr, osg::ref_ptr<Resource::BulletShapeInstance> shape, btCollisionWorld* world)
|
||||
Actor::Actor(const MWWorld::Ptr& ptr, osg::ref_ptr<const Resource::BulletShape> shape, btCollisionWorld* world)
|
||||
: mCanWaterWalk(false), mWalkingOnWater(false)
|
||||
, mCollisionObject(0), mForce(0.f, 0.f, 0.f), mOnGround(false)
|
||||
, mInternalCollisionMode(true)
|
||||
|
|
|
@ -15,7 +15,7 @@ class btCollisionObject;
|
|||
|
||||
namespace Resource
|
||||
{
|
||||
class BulletShapeInstance;
|
||||
class BulletShape;
|
||||
}
|
||||
|
||||
namespace MWPhysics
|
||||
|
@ -48,7 +48,7 @@ namespace MWPhysics
|
|||
class Actor : public PtrHolder
|
||||
{
|
||||
public:
|
||||
Actor(const MWWorld::Ptr& ptr, osg::ref_ptr<Resource::BulletShapeInstance> shape, btCollisionWorld* world);
|
||||
Actor(const MWWorld::Ptr& ptr, osg::ref_ptr<const Resource::BulletShape> shape, btCollisionWorld* world);
|
||||
~Actor();
|
||||
|
||||
/**
|
||||
|
|
|
@ -1234,11 +1234,11 @@ namespace MWPhysics
|
|||
}
|
||||
|
||||
void PhysicsSystem::addActor (const MWWorld::Ptr& ptr, const std::string& mesh) {
|
||||
osg::ref_ptr<Resource::BulletShapeInstance> shapeInstance = mShapeManager->getInstance(mesh);
|
||||
if (!shapeInstance)
|
||||
osg::ref_ptr<const Resource::BulletShape> shape = mShapeManager->getShape(mesh);
|
||||
if (!shape)
|
||||
return;
|
||||
|
||||
Actor* actor = new Actor(ptr, shapeInstance, mCollisionWorld);
|
||||
Actor* actor = new Actor(ptr, shape, mCollisionWorld);
|
||||
mActors.insert(std::make_pair(ptr, actor));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue