Allow Enemy Randomizer in Debug Save (#5841)

This commit is contained in:
nclok1405 2026-01-03 23:19:06 +09:00 committed by GitHub
parent 7db2a97cea
commit 5b275343db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)) {