Fix magic being zeroed out when using fast file select (#3389)

* Move to frame counter init to a place that fast file select also touches

* Undo removing old fix

* Reset on gameover
This commit is contained in:
Josh Bodner
2023-11-14 14:08:45 -08:00
committed by GitHub
parent ba987c49e2
commit fb45b66903
3 changed files with 10 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ u64 D_801614D0[0xA00];
#endif
PlayState* gPlayState;
s16 firstInit = 0;
s16 gEnPartnerId;
@@ -490,6 +491,12 @@ void Play_Init(GameState* thisx) {
}
}
// Properly initialize the frame counter so it doesn't use garbage data
if (!firstInit) {
play->gameplayFrames = 0;
firstInit = 1;
}
// Invalid entrance, so immediately exit the game to opening title
if (gSaveContext.entranceIndex == -1) {
gSaveContext.entranceIndex = 0;