diff options
author | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2020-11-07 18:06:37 -0500 |
---|---|---|
committer | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2020-11-07 18:06:37 -0500 |
commit | a29b18ed2f27c2991b0894a69fa04738ba9522ca (patch) | |
tree | 4db08c6d6a2d585a0a42ee6f023faa9f6e8d13fb /src/fldeff_cut.c | |
parent | 8d2d34aae9767f283b3c34140920828e37540d23 (diff) | |
parent | 8b1c2c946b3b58cc938f0496a9af11a641749a1e (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald
Diffstat (limited to 'src/fldeff_cut.c')
-rw-r--r-- | src/fldeff_cut.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 991617713..785f7b426 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -227,7 +227,9 @@ bool8 SetUpFieldMove_Cut(void) y = gPlayerFacingPosition.y + sHyperCutStruct[i].y; tileCuttable = TRUE; - for (j = 0; j < 2; ++j) { + j = 0; + do + { if (sHyperCutStruct[i].unk2[j] == 0) break; if (cutTiles[(u8)(sHyperCutStruct[i].unk2[j] - 1)] == FALSE) @@ -235,7 +237,7 @@ bool8 SetUpFieldMove_Cut(void) tileCuttable = FALSE; break; } - } + } while (++j <= 1); if (tileCuttable == TRUE) { @@ -251,8 +253,11 @@ bool8 SetUpFieldMove_Cut(void) sHyperCutTiles[tileArrayId] = TRUE; ret = TRUE; } - else if (MetatileBehavior_IsCuttableGrass(tileBehavior) == TRUE) - sHyperCutTiles[tileArrayId] = TRUE; + else + { + if (MetatileBehavior_IsCuttableGrass(tileBehavior) == TRUE) + sHyperCutTiles[tileArrayId] = TRUE; + } } } } |