Skip to content

Commit

Permalink
save end tweak for render order
Browse files Browse the repository at this point in the history
  • Loading branch information
Franisz committed Dec 11, 2021
1 parent 8668e53 commit 0f13685
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zUtilities/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace GOTHIC_ENGINE {
}

void Game_SaveEnd() {
quickSave->EndSaveLoad();
quickSave->saveEnd = true;
playerStatus.Archive();
}

Expand Down
4 changes: 2 additions & 2 deletions zUtilities/QuickSave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@ namespace GOTHIC_ENGINE {
void QuickSave::EndSaveLoad() {
isSaving = false;
isLoading = false;
saveEnd = false;

if ( disabledStatus ) {
disabledStatus = false;
ogame->SetShowPlayerStatus( true );
playerStatus.Loop();
}
}

void QuickSave::Loop() {
if ( isLoading && !ogame->IsOnPause() )
if ( (isLoading && !ogame->IsOnPause()) || (isSaving && saveEnd) )
EndSaveLoad();

if ( !Options::UseQuickSave ) return;
Expand Down
1 change: 1 addition & 0 deletions zUtilities/QuickSave.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ namespace GOTHIC_ENGINE {
void StartSaveLoad();

public:
bool saveEnd = false;
bool isSaving = false;
bool isLoading = false;
void EndSaveLoad();
Expand Down

0 comments on commit 0f13685

Please sign in to comment.