Skip to content

Commit

Permalink
Fix enter & exit area
Browse files Browse the repository at this point in the history
  • Loading branch information
ak505188 committed May 6, 2022
1 parent af4e572 commit fe7d449
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions octopath.asl
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ init {
return false;
});

vars.UpdateCounter = (Action)(() => {
vars.counterTextComponent.Settings.Text2 = vars.encounters + "/" + vars.deaths;
});

// Stole this from FF13 Autosplitter, thanks Roosta :)
// Might be better implementation possible
foreach (LiveSplit.UI.Components.IComponent component in timer.Layout.Components) {
Expand All @@ -100,6 +96,10 @@ init {
}
}
}

vars.UpdateCounter = (Action)(() => {
vars.counterTextComponent.Settings.Text2 = vars.encounters + "/" + vars.deaths;
});
}

onReset {
Expand Down Expand Up @@ -547,14 +547,16 @@ split {
return vars.Split("advanced_job_fight_" + vars.NameToKey(vars.AdvancedJobFights[current.zoneID]));
}

// Enter Area
if (vars.AreaZoneIDs.ContainsKey(current.zoneID) && old.zoneID != current.zoneID && old.zoneID != 0 && old.gameState == 2) {
return vars.Split("enter_" + current.zoneID);
}

// Exit Area
if (current.zoneID != 0 && current.zoneID != old.zoneID && vars.AreaZoneIDs.ContainsKey(old.zoneID) && (old.gameState == 2 || old.gameState == 4)) {
return vars.Split("exit_" + old.zoneID);
// Enter & Exit Area
if (old.zoneID != current.zoneID && old.zoneID != 0) {
// Enter Area
if (vars.AreaZoneIDs.ContainsKey(current.zoneID) && current.gameState == 2 && old.gameState == 2 && vars.Split("enter_" + current.zoneID)) {
return true;
}
// Exit Area
if (vars.AreaZoneIDs.ContainsKey(old.zoneID) && (old.gameState == 2 || old.gameState == 4) && vars.Split("exit_" + old.zoneID)) {
return true;
}
}

// Characters Joining
Expand Down

0 comments on commit fe7d449

Please sign in to comment.