Skip to content

Commit 69fa1ee

Browse files
committed
Merge branch 'soundgenorder' into 'master'
Write SoundGens after their creatures See merge request OpenMW/openmw!4420
2 parents 462e118 + 9395624 commit 69fa1ee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/opencs/model/doc/saving.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ CSMDoc::Saving::Saving(Document& document, const std::filesystem::path& projectP
9797
appendStage(
9898
new WriteCollectionStage<CSMWorld::IdCollection<ESM::BodyPart>>(mDocument.getData().getBodyParts(), mState));
9999

100-
appendStage(new WriteCollectionStage<CSMWorld::IdCollection<ESM::SoundGenerator>>(
101-
mDocument.getData().getSoundGens(), mState));
102-
103100
appendStage(new WriteCollectionStage<CSMWorld::IdCollection<ESM::MagicEffect>>(
104101
mDocument.getData().getMagicEffects(), mState));
105102

@@ -108,6 +105,10 @@ CSMDoc::Saving::Saving(Document& document, const std::filesystem::path& projectP
108105

109106
appendStage(new WriteRefIdCollectionStage(mDocument, mState));
110107

108+
// Can reference creatures so needs to load after them for TESCS compatibility
109+
appendStage(new WriteCollectionStage<CSMWorld::IdCollection<ESM::SoundGenerator>>(
110+
mDocument.getData().getSoundGens(), mState));
111+
111112
appendStage(new CollectionReferencesStage(mDocument, mState));
112113

113114
appendStage(new WriteCellCollectionStage(mDocument, mState));

0 commit comments

Comments
 (0)