1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 03:49:41 +00:00

Add Ogre::Light objects to the object list

Note that NIFs actually have NiLight-based light records which could be
used to create Ogre::Light objects. However, no Morrowind NIF uses them,
as far as I can tell.
This commit is contained in:
Chris Robinson 2013-08-05 16:17:40 -07:00
parent a9cc3a2844
commit 57fb065a86
3 changed files with 5 additions and 1 deletions

View file

@ -35,11 +35,14 @@ void Animation::AnimationValue::setValue(Ogre::Real)
void Animation::destroyObjectList(Ogre::SceneManager *sceneMgr, NifOgre::ObjectList &objects)
{
for(size_t i = 0;i < objects.mLights.size();i++)
sceneMgr->destroyLight(objects.mLights[i]);
for(size_t i = 0;i < objects.mParticles.size();i++)
sceneMgr->destroyParticleSystem(objects.mParticles[i]);
for(size_t i = 0;i < objects.mEntities.size();i++)
sceneMgr->destroyEntity(objects.mEntities[i]);
objects.mControllers.clear();
objects.mLights.clear();
objects.mParticles.clear();
objects.mEntities.clear();
objects.mSkelBase = NULL;

View file

@ -159,7 +159,7 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh, bool
}
if(!mIsStatic || !Settings::Manager::getBool("use static geometry", "Objects") ||
anyTransparency || !objects.mParticles.empty())
anyTransparency || !objects.mParticles.empty() || !objects.mLights.empty())
{
for(size_t i = 0;i < objects.mEntities.size();i++)
{

View file

@ -43,6 +43,7 @@ struct ObjectList {
Ogre::Entity *mSkelBase;
std::vector<Ogre::Entity*> mEntities;
std::vector<Ogre::ParticleSystem*> mParticles;
std::vector<Ogre::Light*> mLights;
std::map<int,TextKeyMap> mTextKeys;