Merge pull request #1391 from aMannus/rando-skip-scarecrow

Rando: Add Skip Scarecrow's Song option
This commit is contained in:
briaguya
2022-09-03 15:04:58 -04:00
committed by GitHub
7 changed files with 31 additions and 8 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 = globalCtx->msgCtx.ocarinaAction == OCARINA_ACTION_FREE_PLAY &&
((CVar_GetS32("gSkipScarecrow", 0) && gSaveContext.scarecrowSpawnSongSet) ||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
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);