mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
commit
2bdfc3000c
@ -73,7 +73,7 @@ Animation::~Animation()
|
|||||||
|
|
||||||
void Animation::setObjectRoot(Ogre::SceneNode *node, const std::string &model, bool baseonly)
|
void Animation::setObjectRoot(Ogre::SceneNode *node, const std::string &model, bool baseonly)
|
||||||
{
|
{
|
||||||
OgreAssert(mAnimSources.size() != 0, "Setting object root while animation sources are set!");
|
OgreAssert(mAnimSources.size() == 0, "Setting object root while animation sources are set!");
|
||||||
if(!mInsert)
|
if(!mInsert)
|
||||||
mInsert = node->createChildSceneNode();
|
mInsert = node->createChildSceneNode();
|
||||||
|
|
||||||
|
@ -44,9 +44,14 @@ namespace MWRender
|
|||||||
{
|
{
|
||||||
mSceneMgr = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
|
mSceneMgr = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
|
||||||
|
|
||||||
/// \todo Read the fallback values from INIImporter (Inventory:Directional*)
|
// This is a dummy light to turn off shadows without having to use a separate set of shaders
|
||||||
Ogre::Light* l = mSceneMgr->createLight();
|
Ogre::Light* l = mSceneMgr->createLight();
|
||||||
l->setType (Ogre::Light::LT_DIRECTIONAL);
|
l->setType (Ogre::Light::LT_DIRECTIONAL);
|
||||||
|
l->setDiffuseColour (Ogre::ColourValue(0,0,0));
|
||||||
|
|
||||||
|
/// \todo Read the fallback values from INIImporter (Inventory:Directional*)
|
||||||
|
l = mSceneMgr->createLight();
|
||||||
|
l->setType (Ogre::Light::LT_DIRECTIONAL);
|
||||||
l->setDirection (Ogre::Vector3(0.3, -0.7, 0.3));
|
l->setDirection (Ogre::Vector3(0.3, -0.7, 0.3));
|
||||||
l->setDiffuseColour (Ogre::ColourValue(1,1,1));
|
l->setDiffuseColour (Ogre::ColourValue(1,1,1));
|
||||||
|
|
||||||
|
@ -374,14 +374,12 @@ void NpcAnimation::updateParts(bool forceupdate)
|
|||||||
NifOgre::ObjectList NpcAnimation::insertBoundedPart(const std::string &model, int group, const std::string &bonename)
|
NifOgre::ObjectList NpcAnimation::insertBoundedPart(const std::string &model, int group, const std::string &bonename)
|
||||||
{
|
{
|
||||||
NifOgre::ObjectList objects = NifOgre::Loader::createObjects(mSkelBase, bonename, mInsert, model);
|
NifOgre::ObjectList objects = NifOgre::Loader::createObjects(mSkelBase, bonename, mInsert, model);
|
||||||
setRenderProperties(objects, mVisibilityFlags, RQG_Main, RQG_Alpha);
|
setRenderProperties(objects, (mViewMode == VM_FirstPerson) ? RV_FirstPerson : mVisibilityFlags, RQG_Main, RQG_Alpha);
|
||||||
|
|
||||||
for(size_t i = 0;i < objects.mEntities.size();i++)
|
for(size_t i = 0;i < objects.mEntities.size();i++)
|
||||||
{
|
{
|
||||||
Ogre::Entity *ent = objects.mEntities[i];
|
Ogre::Entity *ent = objects.mEntities[i];
|
||||||
ent->getUserObjectBindings().setUserAny(Ogre::Any(group));
|
ent->getUserObjectBindings().setUserAny(Ogre::Any(group));
|
||||||
if(mViewMode == VM_FirstPerson)
|
|
||||||
ent->setCastShadows(false);
|
|
||||||
}
|
}
|
||||||
for(size_t i = 0;i < objects.mParticles.size();i++)
|
for(size_t i = 0;i < objects.mParticles.size();i++)
|
||||||
objects.mParticles[i]->getUserObjectBindings().setUserAny(Ogre::Any(group));
|
objects.mParticles[i]->getUserObjectBindings().setUserAny(Ogre::Any(group));
|
||||||
|
@ -59,6 +59,9 @@ enum VisibilityFlags
|
|||||||
// overlays, we only want these on the main render target
|
// overlays, we only want these on the main render target
|
||||||
RV_Overlay = 1024,
|
RV_Overlay = 1024,
|
||||||
|
|
||||||
|
// First person meshes do not cast shadows
|
||||||
|
RV_FirstPerson = 2048,
|
||||||
|
|
||||||
RV_Map = RV_Terrain + RV_Statics + RV_StaticsSmall + RV_Misc + RV_Water
|
RV_Map = RV_Terrain + RV_Statics + RV_StaticsSmall + RV_Misc + RV_Water
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user