Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: removed MaxPing property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 26, 2023
1 parent fc545bd commit 9a02d9f
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net7.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>ArchiTed</Authors>
<Version>2.4.0</Version>
<Version>2.5.0</Version>
<PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU</Platforms>

Expand Down
1 change: 0 additions & 1 deletion RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public class PluginConfiguration : IPluginConfiguration
public float MeleeRangeOffset = 1;
public bool TargetFriendly = false;
public float AlphaInFill = 0.15f;
public int MaxPing = 200;
public float MinLastAbilityAdvanced = 0.1f;

public SortedSet<uint> DangerousStatus { get; set; } = new SortedSet<uint>()
Expand Down
3 changes: 1 addition & 2 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ public static float DPSTaken
public static ActionID LastGCD { get; private set; } = 0;

public static ActionID LastAbility { get; private set; } = 0;
public static float Ping => Math.Min(Service.Config.MaxPing, LastRTT);
public static float LastRTT { get; set; } = 0.1f;
public static float Ping { get; set; } = 0.1f;

public const float MinAnimationLock = 0.6f;
public static unsafe void AddActionRec(Action act)
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"ConfigWindow_Param_UseOverlayWindow": "Display Top Overlay",
"ConfigWindow_Param_UseOverlayWindowDesc": "This top window is used to display some extra information on your game window, such as target's positional, target and sub-target, etc.",
"ConfigWindow_Param_Basic": "Basic",
"ConfigWindow_Param_MaxPing": "Set your max Ping. If it is too low, may clip.",
"ConfigWindow_Param_ActionAhead": "Set the time advance of using actions",
"ConfigWindow_Param_MinLastAbilityAdvanced": "Set min the time advance of using the last 0gcd.",
"ConfigWindow_Param_CountDownAhead": "Set the time advance of using casting actions on counting down.",
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ internal partial class Strings
public string ConfigWindow_Param_UseOverlayWindow { get; set; } = "Display Top Overlay";
public string ConfigWindow_Param_UseOverlayWindowDesc { get; set; } = "This top window is used to display some extra information on your game window, such as target's positional, target and sub-target, etc.";
public string ConfigWindow_Param_Basic { get; set; } = "Basic";
public string ConfigWindow_Param_MaxPing { get; set; } = "Set your max Ping. If it is too low, may clip.";

public string ConfigWindow_Param_ActionAhead { get; set; } = "Set the time advance of using actions";
public string ConfigWindow_Param_MinLastAbilityAdvanced { get; set; } = "Set min the time advance of using the last 0gcd.";
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private unsafe void DrawStatus()
ImGui.Text("Hostile Near Count: " + DataCenter.NumberOfHostilesInRange.ToString());
ImGui.Text("Hostile Near Count Max Range: " + DataCenter.NumberOfHostilesInMaxRange.ToString());
ImGui.Text("Have Companion: " + DataCenter.HasCompanion.ToString());
ImGui.Text("Targetable: " + Service.Player.IsTargetable().ToString());
ImGui.Text("Ping: " + DataCenter.Ping.ToString());

foreach (var status in Service.Player.StatusList)
{
Expand Down
6 changes: 0 additions & 6 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ private void DrawParamTab()

private void DrawParamBasic()
{
DrawIntNumber(LocalizationManager.RightLang.ConfigWindow_Param_MaxPing,
ref Service.Config.MaxPing, Service.Default.MaxPing, min: 100, max: 500);

ImGui.SameLine();
ImGui.Text($" Ping:{DataCenter.LastRTT:F3}");

DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_ActionAhead,
ref Service.Config.ActionAhead, Service.Default.ActionAhead, max: 0.5f);

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Watcher()
private void UpdateRTTDetour(dynamic expando)
{
PluginLog.LogDebug($"LastRTT:{expando.LastRTT}");
DataCenter.LastRTT = (long)expando.LastRTT / 1000f;
DataCenter.Ping = (long)expando.LastRTT / 1000f;
}

public static string ShowStrSelf { get; private set; } = string.Empty;
Expand Down

0 comments on commit 9a02d9f

Please sign in to comment.