[Time Saver Enhancement] Nighttime GS Always Spawn (#2611)
* Nighttime GS Always Spawn * add hook onSceneSpawnActors * implement onSceneSpawnActors hook to spawn GS in various day scenes * handle the kak tree skull during the day * Update mods.cpp * Add the & * Fixes * Update soh/soh/Enhancements/mods.cpp Co-authored-by: Adam Bird <Archez@users.noreply.github.com> --------- Co-authored-by: Adam Bird <archez39@me.com> Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
This commit is contained in:
@@ -2516,6 +2516,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
Actor_SpawnEntry(&play->actorCtx, actorEntry++, play);
|
||||
}
|
||||
play->numSetupActors = 0;
|
||||
GameInteractor_ExecuteOnSceneSpawnActors();
|
||||
}
|
||||
|
||||
if (actorCtx->unk_02 != 0) {
|
||||
|
||||
@@ -550,7 +550,7 @@ void func_80B0D590(EnSw* this, PlayState* play) {
|
||||
this->collider.elements[0].info.ocElemFlags = 1;
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->actor.scale.x, !IS_DAY ? 0.02f : 0.0f, 0.2f, 0.01f);
|
||||
Math_ApproachF(&this->actor.scale.x, !IS_DAY || CVarGetInteger("gNightGSAlwaysSpawn", 0) ? 0.02f : 0.0f, 0.2f, 0.01f);
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,6 +173,15 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
|
||||
f32 floorY;
|
||||
s16 extraRot;
|
||||
|
||||
// The tree in Kakariko's day scene does not have the same params to spawn the GS
|
||||
// as the night scene, For the always spawn GS enhancement we apply the needed
|
||||
// params to have the GS drop when bonking
|
||||
if ((this->actor.params & 0xFF) == WOOD_TREE_CONICAL_MEDIUM && IS_DAY &&
|
||||
play->sceneNum == SCENE_SPOT01 && CVarGetInteger("gNightGSAlwaysSpawn", 0)) {
|
||||
this->actor.params = 0x2001;
|
||||
this->actor.home.rot.z = 0x71;
|
||||
}
|
||||
|
||||
spawnType = WOOD_SPAWN_NORMAL;
|
||||
actorScale = 1.0f;
|
||||
this->unk_14C = (this->actor.params >> 8) & 0xFF;
|
||||
|
||||
Reference in New Issue
Block a user