diff options
| author | Josh Bodner <30329717+jbodner09@users.noreply.github.com> | 2023-11-14 14:08:45 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-14 17:08:45 -0500 |
| commit | fb45b66903b2c7449a4673a331c2117a94ce02cb (patch) | |
| tree | 2bda1a833cd18f8ac2705f46cee9419013c47d5a /soh/src/code | |
| parent | ba987c49e2e4bfaaccdcff740709489bf59b34d5 (diff) | |
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
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_play.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 841de8f13..59a5d0619 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -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; |
