 |
Description |
This patch fixes a game-breaking bug that is triggered when the player dies 52 times in a row on the world map. The reason for this is that the Game Over event script calls an event that causes the player to exit the current location, which is the blank map for the Game Over screen; this script is the only script that calls the event. However, a side effect of this exit event is that the subsequent event, a return statement, never gets called.
The game uses an event pointer stack to handle event scripts that call each other as subroutines; when a script is called, the stack increases in size, and when a script ends, the stack decreases in size. Since the return statement at the end of the Game Over script does not get called, the stack does not decrease in size, meaning that a significant number of consecutive Game Overs will cause an overflow that will crash the game or worse. This only applies as long as the player is on the world map, as any entrance to an important location will cause the stack to regulate. This patch ensures that the exit event also regulates the stack. |
|