summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Dubé <serprex@users.noreply.github.com>2025-06-05 00:09:06 +0000
committerGitHub <noreply@github.com>2025-06-04 17:09:06 -0700
commit5b2c30edb008ca019871e4423b60ddb548b110cc (patch)
tree72912530553c07ddb2cfd0c89245d2c4697d052c
parent3377dc636a66bc346f9a489399f457693d364f77 (diff)
Faster water temple gate (#5556)
* rando: faster water temple gate * move to time saver
-rw-r--r--soh/soh/Enhancements/randomizer/hook_handlers.cpp2
-rw-r--r--soh/soh/Enhancements/timesaver_hook_handlers.cpp13
2 files changed, 14 insertions, 1 deletions
diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp
index 1ba931513..fca4dfae7 100644
--- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp
+++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp
@@ -2142,7 +2142,7 @@ void RandomizerOnActorUpdateHandler(void* refActor) {
shutterDoor->unk_16E = 0;
}
} else if (actor->id == ACTOR_DOOR_GERUDO) {
- DoorGerudo* gerudoDoor = (DoorGerudo*)actor;
+ DoorGerudo* gerudoDoor = reinterpret_cast<DoorGerudo*>(actor);
gerudoDoor->actionFunc = func_8099485C;
gerudoDoor->dyna.actor.world.pos.y = gerudoDoor->dyna.actor.home.pos.y + 200.0f;
}
diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp
index 1b28638b9..dd8185c1d 100644
--- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp
+++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp
@@ -28,6 +28,7 @@ extern "C" {
#include "src/overlays/actors/ovl_En_Daiku/z_en_daiku.h"
#include "src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h"
#include "src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h"
+#include "src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h"
#include "src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h"
#include "src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h"
#include "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h"
@@ -1384,3 +1385,15 @@ void TimeSaverRegisterHooks() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>(TimeSaverOnItemReceiveHandler);
});
}
+
+void RegisterSkipWaterTempleGateDelay() {
+ COND_ID_HOOK(OnActorUpdate, ACTOR_BG_SPOT06_OBJECTS,
+ CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO), [](void* actor) {
+ BgSpot06Objects* spot06 = static_cast<BgSpot06Objects*>(actor);
+ if (spot06->dyna.actor.params == 0) {
+ spot06->timer = 0;
+ }
+ })
+}
+
+static RegisterShipInitFunc skipWaterTempleGateDelay(RegisterSkipWaterTempleGateDelay);