Enemy rando, fix Dark Link crush etc voidouts (#7038)

This commit is contained in:
djevangelia
2026-08-08 19:59:23 +02:00
committed by GitHub
parent f6f21477b0
commit 6420c435b1
3 changed files with 9 additions and 8 deletions
@@ -656,7 +656,8 @@ void RegisterEnemyRandomizer() {
COND_VB_SHOULD(VB_TRIGGER_VOIDOUT, ENEMY_RANDOMIZER_ENABLED, {
Actor* actor = va_arg(args, Actor*);
if (actor->category != ACTORCAT_PLAYER) {
if (*should == true && actor->category != ACTORCAT_PLAYER) {
// Improvement opportunity: Play sfx
*should = false;
Actor_Kill(actor);
}
@@ -2579,7 +2579,7 @@ typedef enum {
// BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f)
// ```
// #### `args`
// - `*f32`
// - `*Vec3f`
VB_NOT_CAST_FISHING,
// #### `result`
@@ -3076,7 +3076,7 @@ typedef enum {
// #### `result`
// ```c
// true
// varies
// ```
// #### `args`
// - `*Actor`
@@ -4731,8 +4731,10 @@ s32 func_808382DC(Player* this, PlayState* play) {
} else {
sp68 = ((Player_GetHeight(this) - 8.0f) < (this->unk_6C4 * this->actor.scale.y));
if (sp68 || (this->actor.bgCheckFlags & BGCHECKFLAG_CRUSHED) || (sFloorType == 9) ||
(this->stateFlags2 & PLAYER_STATE2_FORCED_VOID_OUT)) {
if (GameInteractor_Should(VB_TRIGGER_VOIDOUT,
(sp68 || (this->actor.bgCheckFlags & BGCHECKFLAG_CRUSHED) || (sFloorType == 9) ||
(this->stateFlags2 & PLAYER_STATE2_FORCED_VOID_OUT)),
&this->actor)) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
if (sp68) {
@@ -4758,9 +4760,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw = respawnInfo->yaw;
}
if (GameInteractor_Should(VB_TRIGGER_VOIDOUT, true, this)) {
Play_TriggerVoidOut(play);
}
Play_TriggerVoidOut(play);
}
Player_PlayVoiceSfx(this, NA_SE_VO_LI_TAKEN_AWAY);