Merge pull request #1406 from ghoulslash/be_bugfix

Fix data corruption from HideMegaTriggerSprite
This commit is contained in:
ghoulslash 2021-05-04 09:45:03 -06:00 committed by GitHub
commit 6b7a7ca260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1483,8 +1483,11 @@ bool32 IsMegaTriggerSpriteActive(void)
void HideMegaTriggerSprite(void)
{
ChangeMegaTriggerSprite(gBattleStruct->mega.triggerSpriteId, 0);
gSprites[gBattleStruct->mega.triggerSpriteId].tHide = TRUE;
if (gBattleStruct->mega.triggerSpriteId != 0xFF)
{
ChangeMegaTriggerSprite(gBattleStruct->mega.triggerSpriteId, 0);
gSprites[gBattleStruct->mega.triggerSpriteId].tHide = TRUE;
}
}
void DestroyMegaTriggerSprite(void)