mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 20:33:47 +01:00
Remove Mimikyu check from loop
More efficient than checking in each loop iteration.
This commit is contained in:
parent
90fdb74ccb
commit
d2d7b6ffef
@ -8341,14 +8341,14 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut)
|
|||||||
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
||||||
};
|
};
|
||||||
|
|
||||||
currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL);
|
if (isSwitchingOut) // Don't revert Mimikyu Busted when switching out
|
||||||
for (i = 0; i < ARRAY_COUNT(species); i++)
|
i = 1;
|
||||||
{
|
else
|
||||||
if (i == 0 && isSwitchingOut)
|
i = 0;
|
||||||
{
|
|
||||||
i++; // Don't revert Mimikyu Busted when switching out
|
|
||||||
}
|
|
||||||
|
|
||||||
|
currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL);
|
||||||
|
for (; i < ARRAY_COUNT(species); i++)
|
||||||
|
{
|
||||||
if (currSpecies == species[i][0])
|
if (currSpecies == species[i][0])
|
||||||
{
|
{
|
||||||
SetMonData(&party[monId], MON_DATA_SPECIES, &species[i][1]);
|
SetMonData(&party[monId], MON_DATA_SPECIES, &species[i][1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user