mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
Move all checks into update hook
This commit is contained in:
parent
3a87d3bba5
commit
24530bfbd6
@ -777,11 +777,14 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
});
|
||||
}
|
||||
|
||||
if (actor->id == ACTOR_BG_SPOT03_TAKI && Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY) &&
|
||||
(INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME || INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY)) {
|
||||
if (actor->id == ACTOR_BG_SPOT03_TAKI) {
|
||||
bgSpot03UpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
if (innerActor->id == ACTOR_BG_SPOT03_TAKI && CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SleepingWaterfall"), 0)) {
|
||||
if (innerActor->id == ACTOR_BG_SPOT03_TAKI &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SleepingWaterfall"), 0) &&
|
||||
CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) &&
|
||||
(INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME || INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY)
|
||||
) {
|
||||
BgSpot03Taki* bgSpot03 = static_cast<BgSpot03Taki*>(innerActorRef);
|
||||
if (bgSpot03->actionFunc == func_808ADEF0) {
|
||||
bgSpot03->actionFunc = BgSpot03Taki_KeepOpen;
|
||||
|
Loading…
Reference in New Issue
Block a user