summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--soh/soh/Enhancements/Minigames/IngoRaceOnce.cpp6
-rw-r--r--soh/src/overlays/actors/ovl_En_In/z_en_in.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/soh/soh/Enhancements/Minigames/IngoRaceOnce.cpp b/soh/soh/Enhancements/Minigames/IngoRaceOnce.cpp
index 8ba9b9044..afcea2d14 100644
--- a/soh/soh/Enhancements/Minigames/IngoRaceOnce.cpp
+++ b/soh/soh/Enhancements/Minigames/IngoRaceOnce.cpp
@@ -11,12 +11,14 @@ extern PlayState* gPlayState;
#define CVAR_INGO_RACE_ONCE_NAME CVAR_ENHANCEMENT("IngoRaceOnce")
#define CVAR_INGO_RACE_ONCE_VALUE CVarGetInteger(CVAR_INGO_RACE_ONCE_NAME, INGO_RACE_TWICE)
+static constexpr u16 INGO_RACE_EVENT_FLAGS = 0x8046;
+
static void RegisterIngoRaceOnce() {
COND_VB_SHOULD(VB_RACE_INGO, CVAR_INGO_RACE_ONCE_VALUE == INGO_RACE_NONE, {
s32 entranceIndex = va_arg(args, s32);
- if (entranceIndex == 2 && (gSaveContext.eventInf[0] & 0x10) == 0) {
+ if (entranceIndex == 2 && (gSaveContext.eventInf[0] & 0x12) == 2) {
gPlayState->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
- gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 0x8006;
+ gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | INGO_RACE_EVENT_FLAGS;
gPlayState->transitionType = TRANS_TYPE_FADE_WHITE;
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.timerState = TIMER_STATE_OFF;
diff --git a/soh/src/overlays/actors/ovl_En_In/z_en_in.c b/soh/src/overlays/actors/ovl_En_In/z_en_in.c
index aeee316cb..686218842 100644
--- a/soh/src/overlays/actors/ovl_En_In/z_en_in.c
+++ b/soh/src/overlays/actors/ovl_En_In/z_en_in.c
@@ -729,15 +729,19 @@ void func_80A7A848(EnIn* this, PlayState* play) {
gSaveContext.eventInf[0] &= ~0xF;
this->actionFunc = func_80A7A4C8;
} else {
- func_80A79BAC(this, play, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
+ if (GameInteractor_Should(VB_RACE_INGO, true, 2)) {
+ func_80A79BAC(this, play, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
+ }
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
play->msgCtx.stateTimer = 0;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
}
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
- gSaveContext.eventInf[0] &= ~0x20;
- gSaveContext.eventInf[0] &= ~0x40;
+ if (GameInteractor_Should(VB_RACE_INGO, true, 2)) {
+ gSaveContext.eventInf[0] &= ~0x20;
+ gSaveContext.eventInf[0] &= ~0x40;
+ }
}
}