Skip to content

Commit

Permalink
IsEnding only needs nextScene
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Jul 13, 2023
1 parent 8cdba79 commit 8c78cdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified Components/LiveSplit.HollowKnight.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions HollowKnightComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ private void HandleSplits() {
action = OrderedSplits(gameState, uIState, nextScene, sceneName);
}
} else {
action = IsEnding(nextScene, sceneName) ? SplitterAction.Split : SplitterAction.Pass;
action = IsEnding(nextScene) ? SplitterAction.Split : SplitterAction.Pass;
}
} else {
if (currentSplit < Model.CurrentState.Run.Count) {
if (currentSplit + 1 == Model.CurrentState.Run.Count) {
action = IsEnding(nextScene, sceneName) ? SplitterAction.Split : SplitterAction.Pass;
action = IsEnding(nextScene) ? SplitterAction.Split : SplitterAction.Pass;
}
if (action == SplitterAction.Pass) {
if (!settings.Ordered) {
Expand All @@ -178,7 +178,7 @@ private void HandleSplits() {
HandleSplit(action);
}

private bool IsEnding(string nextScene, string sceneName) {
private bool IsEnding(string nextScene) {
return nextScene.StartsWith("Cinematic_Ending", StringComparison.OrdinalIgnoreCase);
}

Expand Down Expand Up @@ -1160,7 +1160,7 @@ private SplitterAction CheckSplit(SplitName split, string nextScene, string scen
case SplitName.ColosseumSilverExit: shouldSplit = mem.PlayerData<bool>(Offset.colosseumSilverCompleted) && !nextScene.StartsWith("Room_Colosseum_Silver") && nextScene != sceneName; break;
case SplitName.ColosseumGoldExit: shouldSplit = mem.PlayerData<bool>(Offset.colosseumGoldCompleted) && !nextScene.StartsWith("Room_Colosseum_Gold") && nextScene != sceneName; break;
case SplitName.SoulTyrantEssenceWithSanctumGrub: shouldSplit = mem.PlayerData<bool>(Offset.mageLordOrbsCollected) && mem.PlayerDataStringList(Offset.scenesGrubRescued).Contains("Ruins1_32"); break;
case SplitName.EndingSplit: shouldSplit = IsEnding(nextScene, sceneName); break;
case SplitName.EndingSplit: shouldSplit = IsEnding(nextScene); break;

case SplitName.EnterHornet1: shouldSplit = nextScene.StartsWith("Fungus1_04") && nextScene != sceneName; break;
case SplitName.EnterSoulMaster: shouldSplit = nextScene.StartsWith("Ruins1_24") && nextScene != sceneName; break;
Expand Down

0 comments on commit 8c78cdc

Please sign in to comment.