summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authornclok1405 <155463060+nclok1405@users.noreply.github.com>2026-01-03 23:19:06 +0900
committerGitHub <noreply@github.com>2026-01-03 14:19:06 +0000
commit5b275343dbfe6ce2c912bdfc7502ad10eb54102e (patch)
treeed642067f0af7a82d78b5045390368a8857eb811 /soh/src/code
parent7db2a97cea468577e55f31d2d025fef66da2c12f (diff)
Allow Enemy Randomizer in Debug Save (#5841)
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_actor.c5
1 files 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, &params)) {