mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-17 22:02:19 -05:00
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:
parent
c6eb165cf1
commit
1cf3319936
@ -302,6 +302,10 @@ typedef enum {
|
||||
/*** Play Cutscenes ***/
|
||||
|
||||
VB_PLAY_TRANSITION_CS,
|
||||
VB_PLAY_GORON_FREE_CS,
|
||||
VB_PLAY_FIRE_ARROW_CS,
|
||||
// Vanilla condition: INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE
|
||||
VB_SPAWN_FIRE_ARROW,
|
||||
// Opt: *EventChkInf flag
|
||||
VB_PLAY_ENTRANCE_CS,
|
||||
// Opt: *cutsceneId
|
||||
@ -329,8 +333,6 @@ typedef enum {
|
||||
VB_PLAY_BOLERO_OF_FIRE_CS,
|
||||
VB_PLAY_SERENADE_OF_WATER_CS,
|
||||
VB_PLAY_EYEDROPS_CS,
|
||||
// Opt: *EnGo2
|
||||
VB_PLAY_GORON_FREE_CS,
|
||||
// Opt: *EnOkarinaTag
|
||||
VB_PLAY_DRAIN_WELL_CS,
|
||||
// Opt: *EnOkarinaTag
|
||||
@ -371,6 +373,7 @@ typedef enum {
|
||||
|
||||
/*** Give Items ***/
|
||||
|
||||
VB_FREEZE_ON_SKULL_TOKEN,
|
||||
// Opt: *EnBox
|
||||
VB_GIVE_ITEM_FROM_CHEST,
|
||||
// Opt: ItemID
|
||||
@ -379,7 +382,6 @@ typedef enum {
|
||||
VB_GIVE_ITEM_FROM_ITEM_00,
|
||||
// Opt: *EnSi
|
||||
VB_GIVE_ITEM_SKULL_TOKEN,
|
||||
VB_FREEZE_ON_SKULL_TOKEN,
|
||||
// Opt: *EnCow
|
||||
VB_GIVE_ITEM_FROM_COW,
|
||||
// Opt: *EnDns
|
||||
|
@ -800,6 +800,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;
|
||||
|
@ -535,6 +535,12 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_FIRE_ARROW_CS: {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 0)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_GIVE_ITEM_MINUET_OF_FOREST:
|
||||
case VB_GIVE_ITEM_BOLERO_OF_FIRE:
|
||||
case VB_GIVE_ITEM_SERENADE_OF_WATER:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user