Fix Hard Lock - #2
Open
StarlitLuna wants to merge 1 commit into
Open
Conversation
Owner
|
should probably check both to be safe |
Author
|
I don't think it's possible for you to be anywhere but inside a stage when GameState is In the case GameStates_Ingame:
...
switch ( Cheats_ExitStage )
{
case 8:
GameState = GameStates_NormalExit;
sub_43C340();
goto LABEL_369;
case 1:
SetNextLevel();
sub_43C340();
if ( !HaveChaoKey
&& (CurrentLevel < LevelIDs_CannonsCoreE || CurrentLevel > LevelIDs_CannonsCoreK)
&& HIBYTE(word_1DEB31F) )
{
++byte_1DEB31E;
byte_1DEB321 = 1;
}
goto LABEL_369;
case 2:
if ( Life_Count[0] > 0 )
{
switch ( CurrentLevel )
{
case LevelIDs_CannonsCoreS:
case LevelIDs_CannonsCoreE:
case LevelIDs_CannonsCoreR:
case LevelIDs_CannonsCoreK:
if ( MissionNum != 3 )
{
goto LABEL_59;
}
NextLevel = LevelIDs_CannonsCoreT;
byte_174B00D = 0;
HaveChaoKey = 0;
GameState = GameStates_Exit_3;
sub_43C340();
break;
case LevelIDs_KingBoomBoo:
dword_1A55940 = dword_1A557D8;
v10 = HIBYTE(dword_1A557D8);
LOBYTE(v10) = 0;
sub_426620(0, v10, 0);
GameState = GameStates_RestartLevel_NoLifeLost;
sub_43C340();
break;
default:
LABEL_59:
GameState = GameStates_RestartLevel_NoLifeLost;
sub_43C340();
break;
}
}
else
{
GameState = GameStates_NormalExit;
NextLevel = 0;
sub_43C340();
}
goto LABEL_369;
case 3:
GameState = GameStates_Exit_3;
sub_43C340();
goto LABEL_369;
case 7:
if ( CurrentLevel == LevelIDs_CannonsCoreS )
{
NextLevel = LevelIDs_CannonsCoreT;
byte_174B00D = 1;
GameState = GameStates_Exit_3;
}
else
{
GameState = GameStates_ReturnRing;
}
sub_43C340();
goto LABEL_369;
case 4:
GameState = GameStates_RestartLevel_1;
sub_43C340();
goto LABEL_369;
case 5:
switch ( CurrentLevel )
{
case LevelIDs_CannonsCoreS:
case LevelIDs_CannonsCoreE:
case LevelIDs_CannonsCoreR:
case LevelIDs_CannonsCoreK:
NextLevel = LevelIDs_CannonsCoreT;
byte_174B00D = 0;
HaveChaoKey = 0;
GameState = GameStates_Exit_3;
break;
default:
GameState = GameStates_NormalRestart;
break;
}
sub_43C340();
sub_437E90();
byte_174AFD9 = 0;
goto LABEL_369;
}
if ( v8 ) // PAUSING
{
PlaySoundProbably(0x8002, 0, 0, 0);
dword_1A55940 = dword_1A557D8;
v11 = HIBYTE(dword_1A557D8);
GameState = GameStates_Pause;
LOBYTE(v11) = 0;
PauseSelection = 0;
sub_426620(0, v11, GameStates_Inactive);
dword_17472BC = 1;
dword_1A558B8 = 0;
dword_1A558BC = 0;
MenuButtons_SomethingWasPressed = 0;
sub_436020(v12);
sub_439060();
...Edit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change check to use gamestate instead of gamemode. Fixes #1