mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 22:53:54 +00:00
Fix first person meshes casting shadows
This commit is contained in:
parent
a049638e7f
commit
61661c8653
2 changed files with 4 additions and 3 deletions
|
@ -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 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++)
|
||||
{
|
||||
Ogre::Entity *ent = objects.mEntities[i];
|
||||
ent->getUserObjectBindings().setUserAny(Ogre::Any(group));
|
||||
if(mViewMode == VM_FirstPerson)
|
||||
ent->setCastShadows(false);
|
||||
}
|
||||
for(size_t i = 0;i < objects.mParticles.size();i++)
|
||||
objects.mParticles[i]->getUserObjectBindings().setUserAny(Ogre::Any(group));
|
||||
|
|
|
@ -59,6 +59,9 @@ enum VisibilityFlags
|
|||
// overlays, we only want these on the main render target
|
||||
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
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue