1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 21:19:40 +00:00

Accept a ConstPtr in getHitContact

This commit is contained in:
scrawl 2015-12-18 17:38:21 +01:00
parent 0796f49c17
commit 6c505ca06f
5 changed files with 6 additions and 6 deletions

View file

@ -248,7 +248,7 @@ namespace MWBase
/// Returns a pointer to the object the provided object would hit (if within the /// Returns a pointer to the object the provided object would hit (if within the
/// specified distance), and the point where the hit occurs. This will attempt to /// specified distance), and the point where the hit occurs. This will attempt to
/// use the "Head" node, or alternatively the "Bip01 Head" node as a basis. /// use the "Head" node, or alternatively the "Bip01 Head" node as a basis.
virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::Ptr &ptr, float distance) = 0; virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::ConstPtr &ptr, float distance) = 0;
virtual void adjustPosition (const MWWorld::Ptr& ptr, bool force) = 0; virtual void adjustPosition (const MWWorld::Ptr& ptr, bool force) = 0;
///< Adjust position after load to be on ground. Must be called after model load. ///< Adjust position after load to be on ground. Must be called after model load.

View file

@ -770,7 +770,7 @@ namespace MWPhysics
} }
}; };
std::pair<MWWorld::Ptr, osg::Vec3f> PhysicsSystem::getHitContact(const MWWorld::Ptr& actor, std::pair<MWWorld::Ptr, osg::Vec3f> PhysicsSystem::getHitContact(const MWWorld::ConstPtr& actor,
const osg::Vec3f &origin, const osg::Vec3f &origin,
const osg::Quat &orient, const osg::Quat &orient,
float queryDistance) float queryDistance)
@ -790,7 +790,7 @@ namespace MWPhysics
object.setWorldTransform(btTransform(toBullet(orient), toBullet(center))); object.setWorldTransform(btTransform(toBullet(orient), toBullet(center)));
const btCollisionObject* me = NULL; const btCollisionObject* me = NULL;
Actor* physactor = getActor(actor); const Actor* physactor = getActor(actor);
if (physactor) if (physactor)
me = physactor->getCollisionObject(); me = physactor->getCollisionObject();

View file

@ -85,7 +85,7 @@ namespace MWPhysics
std::vector<MWWorld::Ptr> getCollisions(const MWWorld::Ptr &ptr, int collisionGroup, int collisionMask) const; ///< get handles this object collides with std::vector<MWWorld::Ptr> getCollisions(const MWWorld::Ptr &ptr, int collisionGroup, int collisionMask) const; ///< get handles this object collides with
osg::Vec3f traceDown(const MWWorld::Ptr &ptr, float maxHeight); osg::Vec3f traceDown(const MWWorld::Ptr &ptr, float maxHeight);
std::pair<MWWorld::Ptr, osg::Vec3f> getHitContact(const MWWorld::Ptr& actor, std::pair<MWWorld::Ptr, osg::Vec3f> getHitContact(const MWWorld::ConstPtr& actor,
const osg::Vec3f &origin, const osg::Vec3f &origin,
const osg::Quat &orientation, const osg::Quat &orientation,
float queryDistance); float queryDistance);

View file

@ -1056,7 +1056,7 @@ namespace MWWorld
} }
std::pair<MWWorld::Ptr,osg::Vec3f> World::getHitContact(const MWWorld::Ptr &ptr, float distance) std::pair<MWWorld::Ptr,osg::Vec3f> World::getHitContact(const MWWorld::ConstPtr &ptr, float distance)
{ {
const ESM::Position &posdata = ptr.getRefData().getPosition(); const ESM::Position &posdata = ptr.getRefData().getPosition();

View file

@ -344,7 +344,7 @@ namespace MWWorld
/// Returns a pointer to the object the provided object would hit (if within the /// Returns a pointer to the object the provided object would hit (if within the
/// specified distance), and the point where the hit occurs. This will attempt to /// specified distance), and the point where the hit occurs. This will attempt to
/// use the "Head" node as a basis. /// use the "Head" node as a basis.
virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::Ptr &ptr, float distance); virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::ConstPtr &ptr, float distance);
/// @note No-op for items in containers. Use ContainerStore::removeItem instead. /// @note No-op for items in containers. Use ContainerStore::removeItem instead.
virtual void deleteObject (const Ptr& ptr); virtual void deleteObject (const Ptr& ptr);