[Enhancement] Dampe's Race awards both rewards at once (#6980)

This commit is contained in:
Jordan Longstaff
2026-07-25 19:07:07 -04:00
committed by GitHub
parent f9512bf446
commit 2c5762a0f2
6 changed files with 78 additions and 29 deletions
@@ -239,9 +239,7 @@ void EnPoRelay_Race(EnPoRelay* this, PlayState* play) {
speed = 3.5f;
}
if (CVarGetInteger(CVAR_ENHANCEMENT("FixDampeGoingBackwards"), false)) {
speed = ABS(speed);
}
GameInteractor_Should(VB_DAMPE_GO_BACKWARDS, true, &speed);
multiplier = 250.0f - this->actor.xzDistToPlayer;
multiplier = CLAMP_MIN(multiplier, 0.0f);
@@ -338,42 +336,21 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) {
}
}
if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) {
if (!IS_RANDO) {
if (this->hookshotSlotFull != 0) {
sp60.x = this->actor.world.pos.x;
sp60.y = this->actor.floorHeight;
sp60.z = this->actor.world.pos.z;
if (gSaveContext.timerSeconds < HIGH_SCORE(HS_DAMPE_RACE)) {
HIGH_SCORE(HS_DAMPE_RACE) = gSaveContext.timerSeconds;
}
if (Flags_GetCollectible(play, this->actor.params) == 0 && gSaveContext.timerSeconds <= 60) {
Item_DropCollectible2(play, &sp60, (this->actor.params << 8) + (0x4000 | ITEM00_HEART_PIECE));
} else {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, sp60.x, sp60.y, sp60.z, 0, 0, 0, 2);
}
} else {
Flags_SetTempClear(play, 4);
HIGH_SCORE(HS_DAMPE_RACE) = gSaveContext.timerSeconds;
}
} else {
if (GameInteractor_Should(VB_DAMPE_AWARD_SECOND_PRIZE, this->hookshotSlotFull != 0)) {
sp60.x = this->actor.world.pos.x;
sp60.y = this->actor.floorHeight;
sp60.z = this->actor.world.pos.z;
if (this->hookshotSlotFull == 0) {
Flags_SetTempClear(play, 4);
Flags_SetTreasure(gPlayState, 0x1E);
HIGH_SCORE(HS_DAMPE_RACE) = gSaveContext.timerSeconds;
}
if (gSaveContext.timerSeconds < HIGH_SCORE(HS_DAMPE_RACE)) {
HIGH_SCORE(HS_DAMPE_RACE) = gSaveContext.timerSeconds;
}
if (Flags_GetCollectible(play, this->actor.params) == 0 && gSaveContext.timerSeconds <= 60) {
Item_DropCollectible2(play, &sp60, (this->actor.params << 8) + (0x4000 | ITEM00_HEART_PIECE));
} else if (Flags_GetCollectible(play, this->actor.params) != 0) {
} else {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, sp60.x, sp60.y, sp60.z, 0, 0, 0, 2);
}
} else {
Flags_SetTempClear(play, 4);
HIGH_SCORE(HS_DAMPE_RACE) = gSaveContext.timerSeconds;
}
Actor_Kill(&this->actor);
}