Fixed a crash involving the final boss's Rock-Paper-Scissors attack.
This crash seemed to happen at a random inconsistent rate, specifically when you fail the Rock Paper Scissors minigame, and are punished with the onslaught of bullets. The problem seems to be tied to the enemy's turn timer (aka, how long does the enemy attack you before their turn ends).
Right as the timer is about to finish, the game attempts to delete the Rock Paper Scissors attack, and any bullets that are currently on-screen. For some weird reason however, sometimes it succeeds at this, and sometimes it just goes to hell.
This patch adjusts the code to prevent this crash from happening, by deleting the bullets one frame BEFORE the enemy's turn ends, instead of right as it ends. There's also a quick failsafe in case it fails to perform this action. This should hopefully avoid any conflict within the code.
Now, I say "hopefully", because despite me testing this several dozen times to confirm it works, at the end of the day, this is a crash that occurs randomly, and those are the worst kinds of crashes. They may not happen if you test it 80 times, but the 81st one could be the one where it happens again. Generally though, this crash seemed to occur at least once per 6 attempts, and after I made the adjustments, I didn't get it during the next dozen tests. I'm just gonna be positive here. Still, were it to happen again, please let me know.
2 comments