|
|
|
@ -9,25 +9,22 @@
|
|
|
|
|
#include "../mwworld/actiontake.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../mwrender/cellimp.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../mwrender/renderinginterface.hpp"
|
|
|
|
|
#include "containerutil.hpp"
|
|
|
|
|
|
|
|
|
|
namespace MWClass
|
|
|
|
|
{
|
|
|
|
|
void Lockpick::insertObj (const MWWorld::Ptr& ptr, MWRender::CellRenderImp& cellRender,
|
|
|
|
|
MWWorld::Environment& environment) const
|
|
|
|
|
void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
|
|
|
|
{
|
|
|
|
|
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
|
|
|
|
ptr.get<ESM::Tool>();
|
|
|
|
|
|
|
|
|
|
assert (ref->base != NULL);
|
|
|
|
|
const std::string &model = ref->base->model;
|
|
|
|
|
MWRender::Objects objects = renderingInterface.getObjects();
|
|
|
|
|
if (!model.empty())
|
|
|
|
|
{
|
|
|
|
|
MWRender::Rendering rendering (cellRender, ref->ref, ref->mData);
|
|
|
|
|
cellRender.insertMesh ("meshes\\" + model);
|
|
|
|
|
cellRender.insertObjectPhysics();
|
|
|
|
|
ref->mData.setHandle (rendering.end (ref->mData.isEnabled()));
|
|
|
|
|
objects.insertMesh(ptr, "meshes\\" + model);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|