diff --git a/components/detournavigator/oscillatingrecastmeshobject.cpp b/components/detournavigator/oscillatingrecastmeshobject.cpp index dd0b956003..5b84231838 100644 --- a/components/detournavigator/oscillatingrecastmeshobject.cpp +++ b/components/detournavigator/oscillatingrecastmeshobject.cpp @@ -4,13 +4,20 @@ namespace DetourNavigator { - OscillatingRecastMeshObject::OscillatingRecastMeshObject(RecastMeshObject impl, std::size_t lastChangeRevision) + OscillatingRecastMeshObject::OscillatingRecastMeshObject(RecastMeshObject&& impl, std::size_t lastChangeRevision) : mImpl(std::move(impl)) , mLastChangeRevision(lastChangeRevision) , mAabb(BulletHelpers::getAabb(mImpl.getShape(), mImpl.getTransform())) { } + OscillatingRecastMeshObject::OscillatingRecastMeshObject(const RecastMeshObject& impl, std::size_t lastChangeRevision) + : mImpl(impl) + , mLastChangeRevision(lastChangeRevision) + , mAabb(BulletHelpers::getAabb(mImpl.getShape(), mImpl.getTransform())) + { + } + bool OscillatingRecastMeshObject::update(const btTransform& transform, const AreaType areaType, std::size_t lastChangeRevision) { diff --git a/components/detournavigator/oscillatingrecastmeshobject.hpp b/components/detournavigator/oscillatingrecastmeshobject.hpp index 476fd4e0df..78a0c4b689 100644 --- a/components/detournavigator/oscillatingrecastmeshobject.hpp +++ b/components/detournavigator/oscillatingrecastmeshobject.hpp @@ -12,7 +12,8 @@ namespace DetourNavigator class OscillatingRecastMeshObject { public: - explicit OscillatingRecastMeshObject(RecastMeshObject impl, std::size_t lastChangeRevision); + explicit OscillatingRecastMeshObject(RecastMeshObject&& impl, std::size_t lastChangeRevision); + explicit OscillatingRecastMeshObject(const RecastMeshObject& impl, std::size_t lastChangeRevision); bool update(const btTransform& transform, const AreaType areaType, std::size_t lastChangeRevision);