rando: always spawn gerudo guard behind gate (also fix gaurd typos) (#5399)

* rando: always spawn guard behind gate (also fix gaurd typos)

someone had seed where they had card so couldn't be caught to pass gate in reverse wasteland

* move guard spawn logic to hook
This commit is contained in:
Philip Dubé
2025-06-19 20:38:11 +00:00
committed by GitHub
parent a9ede7d46e
commit c0ea595fa5
3 changed files with 5 additions and 18 deletions

View File

@@ -97,22 +97,6 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
s32 pad;
EnGe1* this = (EnGe1*)thisx;
// When spawning the gate operator, also spawn an extra gate operator on the wasteland side
if (IS_RANDO &&
(Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) &&
(this->actor.params & 0xFF) == GE1_TYPE_GATE_OPERATOR) {
// Spawn the extra gaurd with params matching the custom type added (0x0300 + 0x02)
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_GE1, -1358.0f, 88.0f, -3018.0f, 0, 0x95B0, 0,
0x0300 | GE1_TYPE_EXTRA_GATE_OPERATOR, true);
}
// Convert the "extra" gate operator into a normal one so it matches the same params
if ((this->actor.params & 0xFF) == GE1_TYPE_EXTRA_GATE_OPERATOR) {
this->actor.params &= ~0xFF;
this->actor.params |= GE1_TYPE_GATE_OPERATOR;
}
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoWhiteSkel, &gGerudoWhiteIdleAnim, this->jointTable,
this->morphTable, GE1_LIMB_MAX);

View File

@@ -12,7 +12,6 @@ typedef void (*EnGe1ActionFunc)(struct EnGe1*, PlayState*);
typedef enum {
/* 0x00 */ GE1_TYPE_GATE_GUARD,
/* 0x01 */ GE1_TYPE_GATE_OPERATOR,
/* 0x02 */ GE1_TYPE_EXTRA_GATE_OPERATOR, // Custom guard type for entrance randomizer to open the gate
/* 0x04 */ GE1_TYPE_NORMAL = 4,
/* 0x05 */ GE1_TYPE_VALLEY_FLOOR,
/* 0x45 */ GE1_TYPE_HORSEBACK_ARCHERY = 0x45,