Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLongstaff committed Dec 7, 2024
1 parent df81567 commit 135e3c5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions soh/soh/Enhancements/game-interactor/GameInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ typedef enum {
VB_PLAY_SLOW_CHEST_CS,
// Opt: *ShotSun
VB_PLAY_FIRE_ARROW_CS,
VB_SPAWN_FIRE_ARROW,
//*Opt f32 sFishOnHandLength
// Vanilla condition: (s16)sFishingRecordLength < (s16)sFishOnHandLength
VB_SHOULD_CHECK_FOR_FISHING_RECORD,
Expand Down
3 changes: 3 additions & 0 deletions soh/soh/Enhancements/randomizer/hook_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,9 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
*should = false;
break;
}
case VB_SPAWN_FIRE_ARROW:
*should = !Flags_GetTreasure(gPlayState, 0x1F);
break;
case VB_PLAY_NABOORU_CAPTURED_CS:
// This behavior is replicated for randomizer in RandomizerOnItemReceiveHandler
*should = false;
Expand Down
2 changes: 0 additions & 2 deletions soh/soh/Enhancements/timesaver_hook_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,6 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
case VB_PLAY_FIRE_ARROW_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 0)) {
*should = false;
} else if (IS_RANDO) {
*should = !Flags_GetTreasure(gPlayState, 0x1F);
}
break;
}
Expand Down
8 changes: 5 additions & 3 deletions soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
osSyncPrintf(VT_FGCOL(CYAN) "SHOT_SUN HIT!!!!!!!\n" VT_RST);
if (GameInteractor_Should(VB_PLAY_FIRE_ARROW_CS, INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE, this)) {
if (GameInteractor_Should(VB_SPAWN_FIRE_ARROW, INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE)) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7, true);
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gLakeHyliaFireArrowsCS);
gSaveContext.cutsceneTrigger = 1;
if (GameInteractor_Should(VB_PLAY_FIRE_ARROW_CS, true)) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gLakeHyliaFireArrowsCS);
gSaveContext.cutsceneTrigger = 1;
}
} else {
spawnPos.x = 700.0f;
spawnPos.y = -800.0f;
Expand Down

0 comments on commit 135e3c5

Please sign in to comment.