Skip to content

Commit

Permalink
Add AreThingiesEnabled to the save file so that dino mission savegame…
Browse files Browse the repository at this point in the history
…s work correctly.
  • Loading branch information
ChthonVII committed Nov 25, 2022
1 parent afa2cfa commit 0c35e0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TIBERIANDAWN/SAVELOAD.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ bool Save_Misc_Values(FileClass &file)

file.Write(&EffectiveScenario, sizeof(EffectiveScenario));

file.Write(&AreThingiesEnabledo, sizeof(AreThingiesEnabled));

return(true);
}

Expand Down Expand Up @@ -773,6 +775,7 @@ bool Load_Misc_Values(FileClass &file)
file.Read(&EndCountDown, sizeof(EndCountDown));
file.Read(BriefingText, sizeof(BriefingText));

// Chthon CFE Note: You'd already be 1 byte past the end of the file before this safety check would trip...
if (file.Seek(0, SEEK_CUR) < file.Size()) {
file.Read(ActionMovie, sizeof(ActionMovie));
}
Expand All @@ -786,6 +789,9 @@ bool Load_Misc_Values(FileClass &file)
file.Read(&EffectiveScenario, sizeof(EffectiveScenario));
}

if (file.Seek(0, SEEK_CUR) < file.Size()) {
file.Read(&AreThingiesEnabled, sizeof(AreThingiesEnabled));
}

return(true);
}
Expand Down

0 comments on commit 0c35e0e

Please sign in to comment.