The-New-Platinum-Team / PlatinumQuest-Dev

The main repository for the game PlatinumQuest after the formation of new development team.
MIT License
14 stars 8 forks source link

Fix next button sending you to the wrong level at the end of a difficulty #93

Closed thearst3rd closed 1 year ago

thearst3rd commented 1 year ago

EndGameDlg::getNextLevel was calling PlayMissionGui::setMissionType which was mutating the $MissionType, and since it was called multiple times (once to determine if the button should show, another time to actually jump to the right level) it was causing issues. This seems to fix it. The next button has had issues before so it's worth looking over to see if this actually makes sense and won't cause erroneous WRs like it did before. In my singleplayer testing though, I wasn't able to break it and it seems to work fine

thearst3rd commented 1 year ago

Don't merge this, it doesn't work since $MissionType can have spaces in it (e.g. "Packs 1-9")

thearst3rd commented 1 year ago

Ok I'm using newlines+records instead and it seems to work including the packs. There may still be cases I'm not aware of and have yet to test.

RandomityGuy commented 1 year ago

Thank you!