1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 10:53:53 +00:00

Allow Script records with missing SCDT (precompiled code, not used anyway)

Not sure on the exact conditions, but this was missing in a plugin that I made in the TES-CS, while vanilla MW would load it just fine.
This commit is contained in:
scrawl 2014-09-05 16:43:20 +02:00
parent 628d57f18c
commit 1c178768f5

View file

@ -64,8 +64,11 @@ void Script::load(ESMReader &esm)
} }
// Script mData // Script mData
if (esm.isNextSub("SCDT"))
{
mScriptData.resize(mData.mScriptDataSize); mScriptData.resize(mData.mScriptDataSize);
esm.getHNExact(&mScriptData[0], mScriptData.size(), "SCDT"); esm.getHExact(&mScriptData[0], mScriptData.size());
}
// Script text // Script text
mScriptText = esm.getHNOString("SCTX"); mScriptText = esm.getHNOString("SCTX");