more recommended changes

actorid
Jason Hooks 13 years ago
parent f4e7bd6dfd
commit 62d8d1add2

@ -25,7 +25,7 @@ namespace MWClass
if (!model.empty())
{
MWRender::Objects objects = renderingInterface.getObjects();
objects.insertBegin(ptr, true, false);
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
objects.insertMesh(ptr, "meshes\\" + model);
}
}
@ -35,8 +35,10 @@ namespace MWClass
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
ptr.get<ESM::Tool>();
const std::string &model = ref->base->model;
assert (ref->base != NULL);
if(ptr.getRefData().getBaseNode()){
if(!model.empty()){
physics.insertObjectPhysics(ptr);
}

@ -66,7 +66,7 @@ void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_){
}
void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh){
Ogre::SceneNode* insert = mRend.getScene()->getSceneNode(ptr.getRefData().getHandle());
Ogre::SceneNode* insert = ptr.getRefData().getBaseNode();
assert(insert);
NifOgre::NIFLoader::load(mesh);

@ -4,6 +4,7 @@
#include <vector>
#include <openengine/ogre/renderer.hpp>
#include <openengine/bullet/physic.hpp>
#include "ptr.hpp"
namespace MWWorld
{

Loading…
Cancel
Save