Closed Sebp23 closed 1 year ago
Player dying bug has been fixed! We realized that there was a bug that had been present for a while but wasn't causing respawn issues, however, with the addition of the death screen, certain code was no longer being executed after the bug occurred. Since then, the death screen has now been fixed to be event based and the respawn bug has been fixed as well.
The respawn bug was caused by the player respawn event in the level manager not being properly destroyed since it was static, and thus not having its subscribers unsubscribe from the event. This meant that after reloading to the main menu (destroying stuff from the level the player was just in), the objects that were subscribed to the event were destroyed, but were not properly unsubscribed. This led to the invocation of the event trying to reference objects that no longer existed, and thus prevented the death screen from appearing which meant the player could not choose an option to respawn.
This has been fixed by making the event no longer static, and by cleaning up the singleton logic for our level managers.
When the player chooses a level (after choosing the first one they play), the player is unable to die
Reproduction Steps: