Skip to content

Commit

Permalink
Fix changeTarget menu and defaultTarget logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanawy committed Jan 6, 2025
1 parent 9921d65 commit ea4136e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "Run History"
author = "Vanawy"
category = "Overlay"
version = "0.8.2"
version = "0.8.3"

[script]
dependencies = ["MLHook", "MLFeedRaceData"]
Expand Down
7 changes: 4 additions & 3 deletions src/main.as
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,13 @@ void UpdateCurrentTarget()
return;
}

Target @newTarget = @bronze;
Target@ newTarget = @bronze;
int smallestDelta = bronze.time;
Target @defaultTarget = @bronze;
Target@ defaultTarget = @bronze;

if (settingDefaultTarget != DefaultTargetMedalOptions::closestNotBeaten) {
defaultTarget = GetDefaultTarget();
@defaultTarget = GetDefaultTarget();
@newTarget = @defaultTarget;
}

for (uint i = 0; i < targets.Length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/settings.as
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bool settingIsPBOnly = false;
[Setting category="General" name="Show DNF" description="Save not finished runs"]
bool setting_show_dnf = true;

[Setting category="General" name="Default target medal" description="Target medal chosen on map load"]
[Setting category="General" name="Default target medal" description="Selects the baseline medal for target comparison on map load. If default target is beaten plugin will use next closest target (same as closestNotBeaten option)."]
DefaultTargetMedalOptions settingDefaultTarget = DefaultTargetMedalOptions::closestNotBeaten;

[Setting category="General" name="New Runs first" description="Show new runs at the top"]
Expand Down

0 comments on commit ea4136e

Please sign in to comment.