Skip to content

Commit

Permalink
Detect loading screen
Browse files Browse the repository at this point in the history
This additional check prevents crashes of event-based loading if a level
change coincides with an event like a chapter change.
  • Loading branch information
szapp committed Jun 16, 2024
1 parent 76c589c commit 0af7d27
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Ninja/Autosave/Content/autosave.d
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ func int Patch_Autosave_Allow() {
return FALSE;
};

// Additional check for loading screen
var oCGame ogame; ogame = _^(MEM_ReadInt(MEMINT_oGame_Pointer_Address));
if (ogame.load_screen) {
Patch_Autosave_DebugPrint("Loading");
PATCH_AUTOSAVE_EASE = 5000;
return FALSE;
};

// Check for EnforceSavingPolicy script
if (MEM_FindParserSymbol("AllowSaving") != -1) {
MEM_CallByString("AllowSaving");
Expand Down

0 comments on commit 0af7d27

Please sign in to comment.