Implement Skip Scarecrow's Song

This commit is contained in:
aMannus
2022-09-03 14:40:41 +02:00
parent 3aefd4c519
commit 8d2f63419f
7 changed files with 32 additions and 9 deletions
@@ -118,10 +118,12 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
this->unk_194++;
if (((BREG(1) != 0) || ((CVar_GetS32("gSkipScarecrow", 0) != 0) &&
(globalCtx->msgCtx.ocarinaAction == OCARINA_ACTION_FREE_PLAY) && gSaveContext.scarecrowSpawnSongSet)) &&
(this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)){
bool skipScarecrow =
(CVar_GetS32("gSkipScarecrow", 0) && gSaveContext.scarecrowSpawnSongSet && globalCtx->msgCtx.ocarinaAction == OCARINA_ACTION_FREE_PLAY) ||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG) && globalCtx->msgCtx.ocarinaAction == OCARINA_ACTION_FREE_PLAY);
if ((BREG(1) != 0) || skipScarecrow && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)) {
this->actor.draw = func_80A90948;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);