mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Fix for lights with no mesh
This commit is contained in:
parent
5a7f2a4f1f
commit
8c50f8ed26
@ -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…
x
Reference in New Issue
Block a user