summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorKurausukun <lord.uber1@gmail.com>2020-11-02 18:43:40 -0500
committerKurausukun <lord.uber1@gmail.com>2020-11-02 18:43:40 -0500
commit6545745e5997f48e0c853b30b144a10244e7ba20 (patch)
tree5b0e10ea033a9501105983f1671a76ea39ef8ab0 /src/battle_util.c
parent8bf401c2272b7c4182f54cb1285f6067fb5247f9 (diff)
parent9794b077b501ca8c9e5e3f1b6cdd705ec2129d24 (diff)
Merge branch 'reverts' of https://github.com/aaaaaa123456789/pokeemerald into reverts
Diffstat (limited to 'src/battle_util.c')
-rw-r--r--src/battle_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/battle_util.c b/src/battle_util.c
index db9903d33..7025f0e3f 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -536,6 +536,8 @@ 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 <=.
if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
gBattleStruct->safariEscapeFactor = 1;
else