diff --git a/apps/openmw/mwclass/activator.cpp b/apps/openmw/mwclass/activator.cpp index fcad0d333..0cb640877 100644 --- a/apps/openmw/mwclass/activator.cpp +++ b/apps/openmw/mwclass/activator.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" -#include "../mwrender/cellimp.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/apparatus.cpp b/apps/openmw/mwclass/apparatus.cpp index 6f23614e2..74305bead 100644 --- a/apps/openmw/mwclass/apparatus.cpp +++ b/apps/openmw/mwclass/apparatus.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index f409bb9b0..457a988ef 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index f9c20b8e8..8b2c32dd2 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/clothing.cpp b/apps/openmw/mwclass/clothing.cpp index 0dc2b4615..ac1b3e139 100644 --- a/apps/openmw/mwclass/clothing.cpp +++ b/apps/openmw/mwclass/clothing.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index e24177d6c..6fc6f8482 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -7,8 +7,6 @@ #include "../mwworld/ptr.hpp" -#include "../mwrender/cellimp.hpp" - namespace MWClass { void Container::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 12978c0dc..39cf94654 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -9,7 +9,6 @@ #include "../mwworld/actiontalk.hpp" #include "../mwworld/environment.hpp" -#include "../mwrender/cellimp.hpp" #include "../mwmechanics/mechanicsmanager.hpp" @@ -25,6 +24,7 @@ namespace MWClass void Creature::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const { + /* ESMS::LiveCellRef *ref = ptr.get(); @@ -36,11 +36,12 @@ namespace MWClass MWRender::Creatures creatures = renderingInterface.getCreatures(); //creatures.insertBegin(ptr, ptr.getRefData().isEnabled(), false); //creatures.insertMesh(ptr, "meshes\\" + model); - } + }*/ } void Creature::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics, MWWorld::Environment& environment) const { + /* ESMS::LiveCellRef *ref = ptr.get(); @@ -49,7 +50,7 @@ namespace MWClass assert (ref->base != NULL); if(!model.empty()){ physics.insertActorPhysics(ptr); - } + }*/ } diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 5073afb12..ccd1515b4 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -12,7 +12,6 @@ #include "../mwworld/environment.hpp" #include "../mwworld/world.hpp" -#include "../mwrender/cellimp.hpp" #include "../mwrender/objects.hpp" #include diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index 1ef695b44..42ae56fce 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/light.cpp b/apps/openmw/mwclass/light.cpp index 3fb455914..e846e56f8 100644 --- a/apps/openmw/mwclass/light.cpp +++ b/apps/openmw/mwclass/light.cpp @@ -10,8 +10,6 @@ #include "../mwworld/nullaction.hpp" #include "../mwworld/environment.hpp" -#include "../mwrender/cellimp.hpp" - #include "../mwsound/soundmanager.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/lockpick.cpp b/apps/openmw/mwclass/lockpick.cpp index 8e782bb0f..f74536dfc 100644 --- a/apps/openmw/mwclass/lockpick.cpp +++ b/apps/openmw/mwclass/lockpick.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" namespace MWClass diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index d331fd35b..97bbcce2e 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -8,8 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" - #include "containerutil.hpp" namespace MWClass diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index a3171f5b5..47d62f96b 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -11,8 +11,6 @@ #include "../mwworld/environment.hpp" #include "../mwworld/world.hpp" -#include "../mwrender/cellimp.hpp" - #include "../mwmechanics/mechanicsmanager.hpp" #include @@ -34,6 +32,7 @@ namespace MWClass void Npc::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const { + /* ESMS::LiveCellRef *ref = ptr.get(); @@ -45,11 +44,13 @@ namespace MWClass MWRender::Npcs npcs = renderingInterface.getNPCs(); //npcs.insertBegin(ptr, ptr.getRefData().isEnabled(), false); //npcs.insertMesh(ptr, "meshes\\" + model); - } + }*/ } void Npc::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics, MWWorld::Environment& environment) const { + + /* ESMS::LiveCellRef *ref = ptr.get(); @@ -58,7 +59,7 @@ namespace MWClass assert (ref->base != NULL); if(!model.empty()){ physics.insertActorPhysics(ptr); - } + }*/ } diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index 2eb1bbfa4..bf14c3cc8 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwclass/repair.cpp b/apps/openmw/mwclass/repair.cpp index 320e3827e..28e65fa10 100644 --- a/apps/openmw/mwclass/repair.cpp +++ b/apps/openmw/mwclass/repair.cpp @@ -8,8 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" - #include "containerutil.hpp" namespace MWClass diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index dd52ed495..b13480600 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -8,7 +8,6 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" -#include "../mwrender/cellimp.hpp" #include "containerutil.hpp" diff --git a/apps/openmw/mwrender/objects.cpp b/apps/openmw/mwrender/objects.cpp index 8a4216799..2e5a07b60 100644 --- a/apps/openmw/mwrender/objects.cpp +++ b/apps/openmw/mwrender/objects.cpp @@ -23,8 +23,11 @@ bool Objects::lightOutQuadInLin = false; int Objects::uniqueID = 0; +void Objects::setMwRoot(Ogre::SceneNode* root){ + mwRoot = root; +} void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_){ - Ogre::SceneNode* root = mRend.getScene()->getRootSceneNode(); + Ogre::SceneNode* root = mwRoot; Ogre::SceneNode* cellnode; if(mCellSceneNodes.find(ptr.getCell()) == mCellSceneNodes.end()) { diff --git a/apps/openmw/mwrender/objects.hpp b/apps/openmw/mwrender/objects.hpp index 0dd7fdd4c..9c5f796a1 100644 --- a/apps/openmw/mwrender/objects.hpp +++ b/apps/openmw/mwrender/objects.hpp @@ -13,6 +13,7 @@ class Objects{ OEngine::Render::OgreRenderer &mRend; std::map mCellSceneNodes; std::map mSG; + Ogre::SceneNode* mwRoot; bool isStatic; static int uniqueID; static bool lightConst; @@ -38,6 +39,7 @@ public: void deleteObject (const std::string& handle); void removeCell(const MWWorld::Ptr& ptr); void buildStaticGeometry(ESMS::CellStore &cell); + void setMwRoot(Ogre::SceneNode* root); /// insert a light related to the most recent insertBegin call. diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 17403d659..9fb9dd98c 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -45,6 +45,7 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const SceneNode *rt = rend.getScene()->getRootSceneNode(); mwRoot = rt->createChildSceneNode(); mwRoot->pitch(Degree(-90)); + objects.setMwRoot(mwRoot); //used to obtain ingame information of ogre objects (which are faced or selected) mRaySceneQuery = rend.getScene()->createRayQuery(Ray()); @@ -220,4 +221,6 @@ void RenderingManager::toggleLight() setAmbientMode(); } + + }