diff --git a/apps/openmw/mwworld/storedevel/store.hpp b/apps/openmw/mwworld/storedevel/store.hpp index 899e6ddcd..9d94e677e 100644 --- a/apps/openmw/mwworld/storedevel/store.hpp +++ b/apps/openmw/mwworld/storedevel/store.hpp @@ -676,12 +676,6 @@ namespace MWWorld return mExtEnd; } }; - - template <> - class Store - { - }; - } //end namespace #endif diff --git a/components/esm/loadscpt.cpp b/components/esm/loadscpt.cpp index dc28166d4..55a71b6b7 100644 --- a/components/esm/loadscpt.cpp +++ b/components/esm/loadscpt.cpp @@ -6,9 +6,18 @@ namespace ESM { +struct SCHD +{ + NAME32 mName; + SCHDstruct mData; +}; + void Script::load(ESMReader &esm) { - esm.getHNT(mData, "SCHD", 52); + SCHD data; + esm.getHNT(data, "SCHD", 52); + mData = data.mData; + mId = data.mName.toString(); // List of local variables if (esm.isNextSub("SCVR")) @@ -48,7 +57,13 @@ void Script::save(ESMWriter &esm) for (std::vector::iterator it = mVarNames.begin(); it != mVarNames.end(); ++it) varNameString.append(*it); - esm.writeHNT("SCHD", mData, 52); + SCHD data; + memset(&data, 0, sizeof(data)); + + data.mData = mData; + memcpy(data.mName.name, mId.c_str(), mId.size()); + + esm.writeHNT("SCHD", data, 52); if (!mVarNames.empty()) { diff --git a/components/esm/loadscpt.hpp b/components/esm/loadscpt.hpp index db8f85057..10a6d24b1 100644 --- a/components/esm/loadscpt.hpp +++ b/components/esm/loadscpt.hpp @@ -42,13 +42,13 @@ public: approach though. */ - NAME32 mName; - // These describe the sizes we need to allocate for the script // data. int mNumShorts, mNumLongs, mNumFloats, mScriptDataSize, mStringTableSize; }; // 52 bytes + std::string mId; + SCHDstruct mData; std::vector mVarNames; // Variable names