forked from mirror/openmw-tes3mp
Merge pull request #187 from OpenMW/master
Add OpenMW commits up to 20 Mar 2017
This commit is contained in:
commit
ab92b9f795
2 changed files with 20 additions and 2 deletions
|
@ -83,10 +83,24 @@ namespace ESM
|
||||||
loadSCVR(esm);
|
loadSCVR(esm);
|
||||||
break;
|
break;
|
||||||
case ESM::FourCC<'S','C','D','T'>::value:
|
case ESM::FourCC<'S','C','D','T'>::value:
|
||||||
|
{
|
||||||
// compiled script
|
// compiled script
|
||||||
mScriptData.resize(mData.mScriptDataSize);
|
esm.getSubHeader();
|
||||||
esm.getHExact(&mScriptData[0], mScriptData.size());
|
uint32_t subSize = esm.getSubSize();
|
||||||
|
|
||||||
|
if (subSize != static_cast<uint32_t>(mData.mScriptDataSize))
|
||||||
|
{
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << "ESM Warning: Script data size defined in SCHD subrecord does not match size of SCDT subrecord";
|
||||||
|
ss << "\n File: " << esm.getName();
|
||||||
|
ss << "\n Offset: 0x" << std::hex << esm.getFileOffset();
|
||||||
|
std::cerr << ss.str() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
mScriptData.resize(subSize);
|
||||||
|
esm.getExact(&mScriptData[0], mScriptData.size());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case ESM::FourCC<'S','C','T','X'>::value:
|
case ESM::FourCC<'S','C','T','X'>::value:
|
||||||
mScriptText = esm.getHString();
|
mScriptText = esm.getHString();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -88,6 +88,10 @@ void CompositeMapRenderer::compile(CompositeMap &compositeMap, osg::RenderInfo &
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// inform State that Texture attribute has changed due to compiling of FBO texture
|
||||||
|
// should OSG be doing this on its own?
|
||||||
|
state.haveAppliedTextureAttribute(state.getActiveTextureUnit(), osg::StateAttribute::TEXTURE);
|
||||||
|
|
||||||
for (unsigned int i=compositeMap.mCompiled; i<compositeMap.mDrawables.size(); ++i)
|
for (unsigned int i=compositeMap.mCompiled; i<compositeMap.mDrawables.size(); ++i)
|
||||||
{
|
{
|
||||||
osg::Drawable* drw = compositeMap.mDrawables[i];
|
osg::Drawable* drw = compositeMap.mDrawables[i];
|
||||||
|
|
Loading…
Reference in a new issue