mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-21 23:01:26 -04:00
[Enhancement] Dampe's Race awards both rewards at once (#6980)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user