Changed do/while to for loop

This commit is contained in:
AnonymousRandomPerson
2022-10-17 20:49:41 -04:00
parent 393c650201
commit 11af1a98cb

View File

@@ -11,8 +11,8 @@ struct DungeonEntity* GetLeaderEntity()
struct DungeonEntity *leader = gLeaderPokemon;
if (leader == NULL)
{
s32 i = 0;
do
s32 i;
for (i = 0; i < MAX_TEAM_MEMBERS; i++)
{
struct DungeonEntity *currentPokemon = gDungeonGlobalData->teamPokemon[i];
if (EntityExists(currentPokemon) && currentPokemon->entityData->isLeader)
@@ -20,7 +20,7 @@ struct DungeonEntity* GetLeaderEntity()
gLeaderPokemon = currentPokemon;
return currentPokemon;
}
} while (++i < MAX_TEAM_MEMBERS);
}
return NULL;
}
return leader;