Skip to content

Commit

Permalink
Avoid running this cut function if it isn't needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortyne committed Oct 22, 2023
1 parent 4bb8bf6 commit 470dc40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engine/overworld/cut.asm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ UsedCut:

.canCut
ld [wCutTile], a
callfar CheckSetCutEvents
cp $52 ; grass
jr z, .noSetCutEvents
callfar CheckSetCutEvents ; PureRGBnote: ADDED: code that helps prevent softlocks by keeping trees cut down in some scenarios.
.noSetCutEvents
ld a, 1
ld [wActionResultOrTookBattleTurn], a ; used cut
ld a, [wWhichPokemon]
Expand Down

0 comments on commit 470dc40

Please sign in to comment.