|
|
@ -557,6 +557,11 @@ namespace MWPhysics
|
|
|
|
return mCollisionObject.get();
|
|
|
|
return mCollisionObject.get();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const btCollisionObject* getCollisionObject() const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return mCollisionObject.get();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Return solid flag. Not used by the object itself, true by default.
|
|
|
|
/// Return solid flag. Not used by the object itself, true by default.
|
|
|
|
bool isSolid() const
|
|
|
|
bool isSolid() const
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -883,6 +888,12 @@ namespace MWPhysics
|
|
|
|
const Actor* actor = getActor(ignore);
|
|
|
|
const Actor* actor = getActor(ignore);
|
|
|
|
if (actor)
|
|
|
|
if (actor)
|
|
|
|
me = actor->getCollisionObject();
|
|
|
|
me = actor->getCollisionObject();
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const Object* object = getObject(ignore);
|
|
|
|
|
|
|
|
if (object)
|
|
|
|
|
|
|
|
me = object->getCollisionObject();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ClosestNotMeRayResultCallback resultCallback(me, btFrom, btTo);
|
|
|
|
ClosestNotMeRayResultCallback resultCallback(me, btFrom, btTo);
|
|
|
@ -1174,6 +1185,14 @@ namespace MWPhysics
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Object* PhysicsSystem::getObject(const MWWorld::ConstPtr &ptr) const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ObjectMap::const_iterator found = mObjects.find(ptr);
|
|
|
|
|
|
|
|
if (found != mObjects.end())
|
|
|
|
|
|
|
|
return found->second;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PhysicsSystem::updateScale(const MWWorld::Ptr &ptr)
|
|
|
|
void PhysicsSystem::updateScale(const MWWorld::Ptr &ptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ObjectMap::iterator found = mObjects.find(ptr);
|
|
|
|
ObjectMap::iterator found = mObjects.find(ptr);
|
|
|
|