Fixed potential mismatch between players and battlers in tests (#7101)

This commit is contained in:
Eduardo Quezada 2025-06-12 13:46:03 -04:00 committed by GitHub
parent 393bed069a
commit 6cb5016113
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -284,16 +284,17 @@ static void BattleTest_Run(void *data)
break;
}
for (i = 0; i < STATE->battlersCount; i++)
for (i = 0; i < MAX_LINK_PLAYERS; i++)
{
DATA.recordedBattle.playersName[i][0] = CHAR_1 + i;
DATA.recordedBattle.playersName[i][1] = EOS;
DATA.recordedBattle.playersLanguage[i] = GAME_LANGUAGE;
DATA.recordedBattle.playersBattlers[i] = i;
DATA.currentMonIndexes[i] = (i & BIT_FLANK) == B_FLANK_LEFT ? 0 : 1;
}
for (i = 0; i < STATE->battlersCount; i++)
DATA.currentMonIndexes[i] = i / 2;
STATE->runRandomly = TRUE;
STATE->runGiven = TRUE;
STATE->runWhen = TRUE;