mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Non-player actors emitting light from a non-portable light item should be illuminated (Fixes #3588)
This commit is contained in:
parent
3dce155d96
commit
1906d96064
1 changed files with 7 additions and 6 deletions
|
@ -19,6 +19,7 @@
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
|
#include "../mwmechanics/actorutil.hpp"
|
||||||
|
|
||||||
#include "vismask.hpp"
|
#include "vismask.hpp"
|
||||||
|
|
||||||
|
@ -104,8 +105,8 @@ void ActorAnimation::addHiddenItemLight(const MWWorld::ConstPtr& item, const ESM
|
||||||
|
|
||||||
mInsert->addChild(lightSource);
|
mInsert->addChild(lightSource);
|
||||||
|
|
||||||
if (SceneUtil::LightListCallback* callback = mLightListCallback)
|
if (mLightListCallback && mPtr == MWMechanics::getPlayer())
|
||||||
callback->getIgnoredLightSources().insert(lightSource.get());
|
mLightListCallback->getIgnoredLightSources().insert(lightSource.get());
|
||||||
|
|
||||||
mItemLights.insert(std::make_pair(item, lightSource));
|
mItemLights.insert(std::make_pair(item, lightSource));
|
||||||
}
|
}
|
||||||
|
@ -116,11 +117,11 @@ void ActorAnimation::removeHiddenItemLight(const MWWorld::ConstPtr& item)
|
||||||
if (iter == mItemLights.end())
|
if (iter == mItemLights.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SceneUtil::LightListCallback* callback = mLightListCallback)
|
if (mLightListCallback && mPtr == MWMechanics::getPlayer())
|
||||||
{
|
{
|
||||||
std::set<SceneUtil::LightSource*>::iterator ignoredIter = callback->getIgnoredLightSources().find(iter->second.get());
|
std::set<SceneUtil::LightSource*>::iterator ignoredIter = mLightListCallback->getIgnoredLightSources().find(iter->second.get());
|
||||||
if (ignoredIter != callback->getIgnoredLightSources().end())
|
if (ignoredIter != mLightListCallback->getIgnoredLightSources().end())
|
||||||
callback->getIgnoredLightSources().erase(ignoredIter);
|
mLightListCallback->getIgnoredLightSources().erase(ignoredIter);
|
||||||
}
|
}
|
||||||
|
|
||||||
mInsert->removeChild(iter->second);
|
mInsert->removeChild(iter->second);
|
||||||
|
|
Loading…
Reference in a new issue