1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fix lights being rendered on the map (broken by d55fe43fc9)

This commit is contained in:
scrawl 2014-12-31 21:04:13 +01:00
parent 99ae0f901b
commit 5d7eb11596
5 changed files with 20 additions and 20 deletions

View file

@ -198,4 +198,18 @@ void Actors::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
mRendering->updateWaterRippleEmitterPtr (old, cur);
}
void Actors::enableLights()
{
PtrAnimationMap::const_iterator it = mAllActors.begin();
for(;it != mAllActors.end();++it)
it->second->enableLights(true);
}
void Actors::disableLights()
{
PtrAnimationMap::const_iterator it = mAllActors.begin();
for(;it != mAllActors.end();++it)
it->second->enableLights(false);
}
}

View file

@ -45,6 +45,9 @@ namespace MWRender
bool deleteObject (const MWWorld::Ptr& ptr);
///< \return found?
void enableLights();
void disableLights();
void removeCell(MWWorld::CellStore* store);
void update (Ogre::Camera* camera);

View file

@ -237,20 +237,6 @@ Ogre::AxisAlignedBox Objects::getDimensions(MWWorld::CellStore* cell)
return mBounds[cell];
}
void Objects::enableLights()
{
PtrAnimationMap::const_iterator it = mObjects.begin();
for(;it != mObjects.end();++it)
it->second->enableLights(true);
}
void Objects::disableLights()
{
PtrAnimationMap::const_iterator it = mObjects.begin();
for(;it != mObjects.end();++it)
it->second->enableLights(false);
}
void Objects::update(float dt, Ogre::Camera* camera)
{
PtrAnimationMap::const_iterator it = mObjects.begin();

View file

@ -45,9 +45,6 @@ public:
ObjectAnimation* getAnimation(const MWWorld::Ptr &ptr);
void enableLights();
void disableLights();
void update (float dt, Ogre::Camera* camera);
///< per-frame update

View file

@ -677,13 +677,13 @@ void RenderingManager::writeFog(MWWorld::CellStore* cell)
void RenderingManager::disableLights(bool sun)
{
mObjects->disableLights();
mActors->disableLights();
sunDisable(sun);
}
void RenderingManager::enableLights(bool sun)
{
mObjects->enableLights();
mActors->enableLights();
sunEnable(sun);
}