fix(decomp): token race flag not cleared properly#236
fix(decomp): token race flag not cleared properly#236icebound777 wants to merge 1 commit intoCTR-tools:mainfrom
Conversation
|
nice! according to commits history this wasnt even changed recently so i guess this bug was never noticed, good catch |
| @@ -415,7 +415,8 @@ void DECOMP_AA_EndEvent_DrawMenu(void) | |||
| RECTMENU_ClearInput(); | |||
|
|
|||
| sdata->Loading.OnBegin.AddBitsConfig0 |= ADVENTURE_ARENA; | |||
There was a problem hiding this comment.
I believe this block should be
//above the if statement
sdata->Loading.OnBegin.AddBitsConfig0 |= ADVENTURE_ARENA;
//inside the if statement
sdata->Loading.OnBegin.AddBitsConfig8 |= SPAWN_AT_BOSS;
sdata->Loading.OnBegin.RemBitsConfig0 |= ADVENTURE_BOSS;I'm pretty sure that TOKEN_RACE doesn't belong here. Am I missing something
@niko1point0 what are your thoughts?
There was a problem hiding this comment.
I think this may be a case of decomp moving gamemode logic to other modules. I'll see if I can find where the code originates from
There was a problem hiding this comment.
@TheUbMunster
It's a regression caused by 0de8ca3:
sdata->Loading.OnBegin.RemBitsConfig8 |= TOKEN_RACE; was removed and swapped for the wrong RemBitsConfig field.
There was a problem hiding this comment.
Sounds good, I'll double check this and then bring it up with Niko.


Decomp:
The end of a regular adventure race is supposed to remove the
TOKEN_RACEflag fromgGT->gameMode2.However, due to an oversight,
TOKEN_RACEis marked to be removed viasdata->Loading.OnBegin.RemBitsConfig0, which is used forgGT->gameMode1, the wrong gamemode field.Due to this, finishing a CTR Token Challenge in Adventure Mode does not clear the token race flag. If you finish a CTR Token Challenge, then enter a track where you have not beaten the trophy race yet, then you will be thrown into the CTR Token Challenge right away.
This PR addresses this by assigning the
TOKEN_RACEvalue to the correctRemBitsConfigfield.