Fixing the toad dialogue crash

This commit is contained in:
Mors 2022-11-07 09:43:22 +03:00
parent 216570fc84
commit b2cc6a9dfe
2 changed files with 10 additions and 2 deletions

View file

@ -30,6 +30,7 @@ This is the changelog for the current development commit of the game. For the ch
### Fixes:
- Fixed a bug that would cause the level progression to break when "Tie Bowser's Sub to Missions" and "Stay in Course After Getting a Star" settings are both enabled.
- Fixed getting a star from a Toad and choosing "Not Now" while the "Stay in Course After Getting a Star" setting is enabled crashing the game.
- Fixed custom player colors affecting other objects in the game.
- Made fixes to mouse movement in the Mario's face screen.
- Made Mario's face not get affected by the custom player colors.

View file

@ -638,7 +638,14 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
// This is the most readable I could make the code without overcomplicating it
// If we set it to ask
if (configStayInCourse == 1) {
if (configStayInCourse > 0 &&
(gCurrLevelNum == LEVEL_CASTLE_GROUNDS || gCurrLevelNum == LEVEL_CASTLE || gCurrLevelNum == LEVEL_CASTLE_COURTYARD))
{
enable_time_stop();
create_dialog_box_with_response(DIALOG_014);
m->actionState = 1;
}
else if (configStayInCourse == 1) {
enable_time_stop();
create_dialog_box_with_response(gLastCompletedStarNum == 7 ? DIALOG_171 : DIALOG_170);
m->actionState = 1;
@ -664,7 +671,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
// By default
else {
enable_time_stop();
create_dialog_box_with_response(gLastCompletedStarNum == 7 ? DIALOG_013 : DIALOG_014);
create_dialog_box_with_response((gLastCompletedStarNum == 7) ? DIALOG_013 : DIALOG_014);
m->actionState = 1;
}
}