mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-12 20:22:37 -04:00
Ingo Race: skip rematch (#6991)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user