mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:19:40 +00:00
Fix for lights with no mesh
This commit is contained in:
parent
5a7f2a4f1f
commit
8c50f8ed26
1 changed files with 5 additions and 3 deletions
|
@ -1022,7 +1022,10 @@ namespace MWRender
|
||||||
|
|
||||||
osg::Vec4f diffuse = SceneUtil::colourFromRGB(esmLight->mData.mColor);
|
osg::Vec4f diffuse = SceneUtil::colourFromRGB(esmLight->mData.mColor);
|
||||||
if (esmLight->mData.mFlags & ESM::Light::Negative)
|
if (esmLight->mData.mFlags & ESM::Light::Negative)
|
||||||
|
{
|
||||||
diffuse *= -1;
|
diffuse *= -1;
|
||||||
|
diffuse.a() = 1;
|
||||||
|
}
|
||||||
light->setDiffuse(diffuse);
|
light->setDiffuse(diffuse);
|
||||||
light->setAmbient(osg::Vec4f(0,0,0,1));
|
light->setAmbient(osg::Vec4f(0,0,0,1));
|
||||||
light->setSpecular(osg::Vec4f(0,0,0,0));
|
light->setSpecular(osg::Vec4f(0,0,0,0));
|
||||||
|
@ -1197,10 +1200,9 @@ namespace MWRender
|
||||||
|
|
||||||
if (!ptr.getClass().getEnchantment(ptr).empty())
|
if (!ptr.getClass().getEnchantment(ptr).empty())
|
||||||
addGlow(mObjectRoot, getEnchantmentColor(ptr));
|
addGlow(mObjectRoot, getEnchantmentColor(ptr));
|
||||||
|
|
||||||
if (ptr.getTypeName() == typeid(ESM::Light).name() && allowLight)
|
|
||||||
addExtraLight(getOrCreateObjectRoot(), ptr.get<ESM::Light>()->mBase);
|
|
||||||
}
|
}
|
||||||
|
if (ptr.getTypeName() == typeid(ESM::Light).name() && allowLight)
|
||||||
|
addExtraLight(getOrCreateObjectRoot(), ptr.get<ESM::Light>()->mBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue