mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-24 17:54:43 -05:00
Changed do/while to for loop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user