Merge pull request #1248 from luckytyphlosion/master

Bugfix for ChooseMoveOrAction_Doubles.
This commit is contained in:
GriffinR 2020-11-09 12:17:41 -05:00 committed by GitHub
commit 7172ea35f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -450,7 +450,16 @@ static u8 ChooseMoveOrAction_Doubles(void)
{
s32 i;
s32 j;
#ifndef BUGFIX
s32 scriptsToRun;
#else
// the value assigned to this is a u32 (aiFlags)
// this becomes relevant because aiFlags can have bit 31 set
// and scriptsToRun is shifted
// this never happens in the vanilla game because bit 31 is
// only set when it's the first battle
u32 scriptsToRun;
#endif
s16 bestMovePointsForTarget[MAX_BATTLERS_COUNT];
s8 mostViableTargetsArray[MAX_BATTLERS_COUNT];
u8 actionOrMoveIndex[MAX_BATTLERS_COUNT];