From 5b275343dbfe6ce2c912bdfc7502ad10eb54102e Mon Sep 17 00:00:00 2001 From: nclok1405 <155463060+nclok1405@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:19:06 +0900 Subject: [PATCH] Allow Enemy Randomizer in Debug Save (#5841) --- soh/src/code/z_actor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index d1386a48a..59966491c 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -3321,8 +3321,9 @@ int gMapLoading = 0; Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params, s16 canRandomize) { - uint8_t tryRandomizeEnemy = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && gSaveContext.fileNum >= 0 && - gSaveContext.fileNum <= 2 && canRandomize; + uint8_t tryRandomizeEnemy = canRandomize && CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && + ((gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2) || + (gSaveContext.fileNum == 0xFF && gSaveContext.gameMode == GAMEMODE_NORMAL)); if (tryRandomizeEnemy) { if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) {