Skip to content

Commit

Permalink
Skip walking away cutscene when freeing Gorons
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLongstaff committed Dec 7, 2024
1 parent bccd969 commit 3bfb6c7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions soh/soh/Enhancements/game-interactor/GameInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ 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
Expand Down
10 changes: 10 additions & 0 deletions soh/soh/Enhancements/timesaver_hook_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extern "C" {
#include "src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h"
#include "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h"
#include "src/overlays/actors/ovl_En_Owl/z_en_owl.h"
#include "src/overlays/actors/ovl_En_Go2/z_en_go2.h"
#include "src/overlays/actors/ovl_En_Ko/z_en_ko.h"
#include "src/overlays/actors/ovl_En_Ma1/z_en_ma1.h"
#include "src/overlays/actors/ovl_En_Ru2/z_en_ru2.h"
Expand Down Expand Up @@ -506,6 +507,15 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
}
break;
}
case VB_PLAY_GORON_FREE_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), 0)) {
Audio_PlayFanfare(NA_BGM_APPEAR);
EnGo2* enGo2 = va_arg(args, EnGo2*);
Actor_Kill(&enGo2->actor);
*should = false;
}
break;
}
case VB_PLAY_DOOR_OF_TIME_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
*should = false;
Expand Down
7 changes: 6 additions & 1 deletion soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,9 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
switch (this->goronState) {
case 0: // Wake up
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
if (!GameInteractor_Should(VB_PLAY_GORON_FREE_CS, true, this)) {
return;
}
EnGo2_GoronFireCamera(this, play);
play->msgCtx.msgMode = MSGMODE_PAUSED;
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_2);
Expand All @@ -1939,7 +1942,9 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
(f32)((Math_SinS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.x);
player->actor.world.pos.z =
(f32)((Math_CosS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.z);
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
if (GameInteractor_Should(VB_PLAY_GORON_FREE_CS, true)) {
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
}
Audio_PlayFanfare(NA_BGM_APPEAR);
}
break;
Expand Down

0 comments on commit 3bfb6c7

Please sign in to comment.