mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:53:51 +00:00
more recommended changes
This commit is contained in:
parent
f4e7bd6dfd
commit
62d8d1add2
3 changed files with 6 additions and 3 deletions
|
@ -25,7 +25,7 @@ namespace MWClass
|
||||||
if (!model.empty())
|
if (!model.empty())
|
||||||
{
|
{
|
||||||
MWRender::Objects objects = renderingInterface.getObjects();
|
MWRender::Objects objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, true, false);
|
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||||
objects.insertMesh(ptr, "meshes\\" + model);
|
objects.insertMesh(ptr, "meshes\\" + model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,10 @@ namespace MWClass
|
||||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||||
ptr.get<ESM::Tool>();
|
ptr.get<ESM::Tool>();
|
||||||
|
|
||||||
|
|
||||||
|
const std::string &model = ref->base->model;
|
||||||
assert (ref->base != NULL);
|
assert (ref->base != NULL);
|
||||||
if(ptr.getRefData().getBaseNode()){
|
if(!model.empty()){
|
||||||
physics.insertObjectPhysics(ptr);
|
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){
|
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);
|
assert(insert);
|
||||||
|
|
||||||
NifOgre::NIFLoader::load(mesh);
|
NifOgre::NIFLoader::load(mesh);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <openengine/ogre/renderer.hpp>
|
#include <openengine/ogre/renderer.hpp>
|
||||||
#include <openengine/bullet/physic.hpp>
|
#include <openengine/bullet/physic.hpp>
|
||||||
|
#include "ptr.hpp"
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue