Skip to content

Commit

Permalink
Skip walking away cutscene when freeing Gorons (HarbourMasters#4639)
Browse files Browse the repository at this point in the history
* Skip walking away cutscene when freeing Gorons

* Revert a change too far

* Restore Goron walking out animation
  • Loading branch information
JordanLongstaff authored Dec 12, 2024
1 parent 16d69e4 commit 2e71a82
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
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 @@ -324,6 +324,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
7 changes: 7 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 @@ -519,6 +520,12 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
}
break;
}
case VB_PLAY_GORON_FREE_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), 0)) {
*should = false;
}
break;
}
case VB_PLAY_DOOR_OF_TIME_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
*should = false;
Expand Down
14 changes: 10 additions & 4 deletions soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,9 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
switch (this->goronState) {
case 0: // Wake up
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
EnGo2_GoronFireCamera(this, play);
if (GameInteractor_Should(VB_PLAY_GORON_FREE_CS, true)) {
EnGo2_GoronFireCamera(this, play);
}
play->msgCtx.msgMode = MSGMODE_PAUSED;
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_2);
this->waypoint = 1;
Expand All @@ -1939,7 +1941,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 Expand Up @@ -1975,8 +1979,10 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
}
case 4: // Finalize walking away
Message_CloseTextbox(play);
EnGo2_GoronFireClearCamera(this, play);
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
if (GameInteractor_Should(VB_PLAY_GORON_FREE_CS, true)) {
EnGo2_GoronFireClearCamera(this, play);
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
}
Actor_Kill(&this->actor);
break;
case 1:
Expand Down

0 comments on commit 2e71a82

Please sign in to comment.