summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-12-12 23:28:01 -0500
committerGriffinR <griffin.g.richards@gmail.com>2020-12-12 23:30:51 -0500
commit81d95b9325ed2526ce638744408f453a8169abb4 (patch)
treee0f7100b6b35156f0868df537b2e3a149061dd52 /src/battle_util.c
parentba3021db64bd9518f324c1ad89e63e90278f0eb4 (diff)
Use BUGFIX for some inline fixes
Diffstat (limited to 'src/battle_util.c')
-rw-r--r--src/battle_util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/battle_util.c b/src/battle_util.c
index a30145ea4..e929de091 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -536,9 +536,12 @@ void HandleAction_ThrowPokeblock(void)
gBattleStruct->safariPkblThrowCounter++;
if (gBattleStruct->safariEscapeFactor > 1)
{
- // BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch.
- // To fix that change the < in the if statement below to <=.
+ // BUG: safariEscapeFactor can become 0 below. This causes the pokeblock throw glitch.
+ #ifdef BUGFIX
+ if (gBattleStruct->safariEscapeFactor <= sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
+ #else
if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
+ #endif
gBattleStruct->safariEscapeFactor = 1;
else
gBattleStruct->safariEscapeFactor -= sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]];