Skip fire arrow spawn cutscene after shooting sun (#4635)

* Skip fire arrow spawn cutscene after shooting sun

* Fix

* Reorganize VB flags in enum

* A bit of VB cleanup
This commit is contained in:
Jordan Longstaff
2024-12-14 16:43:26 -05:00
committed by GitHub
parent c6eb165cf1
commit 1cf3319936
5 changed files with 23 additions and 10 deletions
+3 -3
View File
@@ -98,7 +98,7 @@ void func_80AFB768(EnSi* this, PlayState* play) {
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
if (GameInteractor_Should(VB_GIVE_ITEM_SKULL_TOKEN, true, this)) {
Item_Give(play, ITEM_SKULL_TOKEN);
if (GameInteractor_Should(VB_FREEZE_ON_SKULL_TOKEN, true, this)) {
if (GameInteractor_Should(VB_FREEZE_ON_SKULL_TOKEN, true)) {
player->actor.freezeTimer = 10;
}
Message_StartTextbox(play, TEXT_GS_NO_FREEZE, NULL);
@@ -124,7 +124,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
if (GameInteractor_Should(VB_GIVE_ITEM_SKULL_TOKEN, true, this)) {
Item_Give(play, ITEM_SKULL_TOKEN);
if (GameInteractor_Should(VB_FREEZE_ON_SKULL_TOKEN, true, this)) {
if (GameInteractor_Should(VB_FREEZE_ON_SKULL_TOKEN, true)) {
player->actor.freezeTimer = 10;
}
Message_StartTextbox(play, TEXT_GS_NO_FREEZE, NULL);
@@ -137,7 +137,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
void func_80AFB950(EnSi* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING && GameInteractor_Should(VB_FREEZE_ON_SKULL_TOKEN, true, this)) {
if (Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING && GameInteractor_Should(VB_FREEZE_ON_SKULL_TOKEN, true)) {
player->actor.freezeTimer = 10;
} else {
SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF);
@@ -7,6 +7,7 @@
#include "z_shot_sun.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "scenes/overworld/spot06/spot06_scene.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "vt.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
@@ -162,11 +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 ((INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE && !IS_RANDO) ||
(!Flags_GetTreasure(play, 0x1F) && IS_RANDO)) {
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;