UPDATE 0.01 B

This commit is contained in:
JJ
2025-11-22 21:35:39 -05:00
parent 818c7181f8
commit 4f775018d6
7 changed files with 180 additions and 136 deletions
+4
View File
@@ -18,6 +18,10 @@ namespace Lua
public static int prevSetKey = 0x06; // XBUTTON2 public static int prevSetKey = 0x06; // XBUTTON2
public static int refreshKey = 0x50; // P public static int refreshKey = 0x50; // P
public static int switchSideKey = 0x4D; // M public static int switchSideKey = 0x4D; // M
public static int shootKey = 0x01; // Left mouse button
public static int altShootKey = 0x02;
// Favorites and user // Favorites and user
public static string favoriteAttackers = null; public static string favoriteAttackers = null;
+15 -9
View File
@@ -51,6 +51,9 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationIcon>a23ae8c4c6863364165637fb70679eb3.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -172,19 +175,22 @@
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets')" /> <Import Project="..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<LangVersion>latest</LangVersion>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets'))" /> <Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.3595.46\build\Microsoft.Web.WebView2.targets'))" />
<Error Condition="!Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets'))" /> <Error Condition="!Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets'))" />
</Target> </Target>
<Import Project="..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" /> <Import Project="..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" />
<ItemGroup> <ItemGroup>
<!-- Include all referenced DLLs --> <!-- Include all referenced DLLs -->
<ReferenceCopyLocalPaths Include="@(ReferencePath)" /> <ReferenceCopyLocalPaths Include="@(ReferencePath)" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Target Name="CopyDllsToLib" AfterTargets="Build"> <Resource Include="a23ae8c4c6863364165637fb70679eb3.ico" />
<MakeDir Directories="$(OutputPath)lib" /> </ItemGroup>
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFolder="$(OutputPath)lib" SkipUnchangedFiles="true" /> <Target Name="CopyDllsToLib" AfterTargets="Build">
</Target> <MakeDir Directories="$(OutputPath)lib" />
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFolder="$(OutputPath)lib" SkipUnchangedFiles="true" />
</Target>
</Project> </Project>
+106 -48
View File
@@ -14,79 +14,136 @@ namespace Lithium
{ {
private bool customSetEnabled = false; private bool customSetEnabled = false;
// Hotkey debounce flags
private bool nextSetHeld = false;
private bool prevSetHeld = false;
private bool refreshHeld = false;
private bool switchSideHeld = false;
public MainWindow() public MainWindow()
{ {
InitializeComponent(); InitializeComponent();
// Load configs
AppendConsole("Initializing Lithium..."); AppendConsole("Initializing Lithium...");
ConfigLoader.LoadInitConfig(); ConfigLoader.LoadInitConfig();
OperatorSets.LoadOperatorSets(); OperatorSets.LoadOperatorSets();
AppendConsole("Loaded Operators | Current Set: " + OperatorSets.CurrentSet); AppendConsole("Loaded Operators | Current Set: " + OperatorSets.CurrentSet);
// Load website inside browse
string url = OperatorSets.ConfigExportUrl; string url = OperatorSets.ConfigExportUrl;
Browser.Source = !string.IsNullOrEmpty(url) ? new Uri(url) : new Uri("https://jj.giggity.gay/exindex.html"); Browser.Source = !string.IsNullOrEmpty(url)
? new Uri(url)
: new Uri("https://jj.giggity.gay/exindex.html");
// Start hotkey watcher
Thread hotkeyThread = new Thread(HotkeyLoop) Thread hotkeyThread = new Thread(HotkeyLoop);
{ hotkeyThread.IsBackground = true;
IsBackground = true
};
hotkeyThread.Start(); hotkeyThread.Start();
// Start recoil worker
Thread recoilThread = new Thread(RecoilLoop);
recoilThread.IsBackground = true;
recoilThread.Start();
} }
#region Keybinds // ============================================================
// RECOIL SYSTEM (THIS IS WHAT WAS MISSING)
// ============================================================
private void RecoilLoop()
{
const int RIGHT_MOUSE = 0x02; // Right mouse button
while (true)
{
bool leftPressed = Utils.IsPressed(ConfigLoader.shootKey); // 0x01
bool rightPressed = Utils.IsPressed(RIGHT_MOUSE); // 0x02
// Only trigger recoil when BOTH are held
bool shouldFire = leftPressed && rightPressed;
if (shouldFire)
{
var recoil = OperatorSets.GetCurrentRecoil();
if (recoil.recoilX != 0 || recoil.recoilY != 0)
{
Utils.MoveMouse(
(int)Math.Round(recoil.recoilX),
(int)Math.Round(recoil.recoilY)
);
}
}
Thread.Sleep(1);
}
}
// ============================================================
// HOTKEY THREAD (debounced)
// ============================================================
private void HotkeyLoop() private void HotkeyLoop()
{ {
while (true) while (true)
{ {
// Next Set // Next Set
if (Utils.IsPressed(ConfigLoader.nextSetKey)) bool nextDown = Utils.IsPressed(ConfigLoader.nextSetKey);
if (nextDown && !nextSetHeld)
{ {
nextSetHeld = true;
OperatorSets.NextSet(); OperatorSets.NextSet();
AppendConsole("Next Set → " + OperatorSets.CurrentSet); AppendConsole("Next Set → " + OperatorSets.CurrentSet);
Utils.SafeSpeak(OperatorSets.CurrentSet); Utils.SafeSpeak(OperatorSets.CurrentSet);
Thread.Sleep(200);
} }
if (!nextDown) nextSetHeld = false;
// Previous Set // Previous Set
if (Utils.IsPressed(ConfigLoader.prevSetKey)) bool prevDown = Utils.IsPressed(ConfigLoader.prevSetKey);
if (prevDown && !prevSetHeld)
{ {
prevSetHeld = true;
OperatorSets.PreviousSet(); OperatorSets.PreviousSet();
AppendConsole("Previous Set → " + OperatorSets.CurrentSet); AppendConsole("Previous Set → " + OperatorSets.CurrentSet);
Utils.SafeSpeak(OperatorSets.CurrentSet); Utils.SafeSpeak(OperatorSets.CurrentSet);
Thread.Sleep(200);
} }
if (!prevDown) prevSetHeld = false;
// Reload Config // Reload config
if (Utils.IsPressed(ConfigLoader.refreshKey)) bool refreshDown = Utils.IsPressed(ConfigLoader.refreshKey);
if (refreshDown && !refreshHeld)
{ {
refreshHeld = true;
OperatorSets.LoadOperatorSets(); OperatorSets.LoadOperatorSets();
AppendConsole("Reloaded config."); AppendConsole("Reloaded config.");
Thread.Sleep(300);
} }
if (!refreshDown) refreshHeld = false;
// Switch Side // Switch Side
if (Utils.IsPressed(ConfigLoader.switchSideKey)) bool switchDown = Utils.IsPressed(ConfigLoader.switchSideKey);
if (switchDown && !switchSideHeld)
{ {
switchSideHeld = true;
OperatorSets.SwitchSide(); OperatorSets.SwitchSide();
AppendConsole("Switched side → " + (OperatorSets.onAttackers ? "Attackers" : "Defenders")); AppendConsole("Switched side → " + (OperatorSets.onAttackers ? "Attackers" : "Defenders"));
Thread.Sleep(250);
} }
if (!switchDown) switchSideHeld = false;
Thread.Sleep(10); Thread.Sleep(8);
} }
} }
#endregion
#region Console Append // ============================================================
// SAFE UI CONSOLE APPEND
// ============================================================
public void AppendConsole(string msg) public void AppendConsole(string msg)
{ {
Dispatcher.Invoke(() => Dispatcher.Invoke(() =>
{ {
ConsoleOutput.Text += msg + "\n"; ConsoleOutput.Text += msg + Environment.NewLine;
ConsoleScroll.ScrollToBottom();
}); });
} }
@@ -97,10 +154,10 @@ namespace Lithium
CustomSetConsole.Text = msg; CustomSetConsole.Text = msg;
}); });
} }
#endregion
#region Custom Set Builder Handlers
// ============================================================
// CUSTOM SET BUILDER
// ============================================================
private void ToggleCustomSet_Click(object sender, RoutedEventArgs e) private void ToggleCustomSet_Click(object sender, RoutedEventArgs e)
{ {
customSetEnabled = !customSetEnabled; customSetEnabled = !customSetEnabled;
@@ -131,23 +188,23 @@ namespace Lithium
try try
{ {
HttpClient client = new HttpClient();
string json = JsonSerializer.Serialize(payload); string json = JsonSerializer.Serialize(payload);
using (HttpClient client = new HttpClient()) var content = new StringContent(json, Encoding.UTF8, "application/json");
{ var response = await client.PostAsync("https://jj.giggity.gay/api/global/add", content);
var content = new StringContent(json, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync("https://jj.giggity.gay/api/global/add", content);
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
UpdateCustomSetConsole($"Successfully published: {name} ({type}) X:{x} Y:{y}"); UpdateCustomSetConsole($"Successfully published: {name} ({type}) X:{x} Y:{y}");
}
else
{
string errorText = await response.Content.ReadAsStringAsync();
UpdateCustomSetConsole($"Failed to publish: {response.StatusCode} - {errorText}");
}
} }
else
{
string errorText = await response.Content.ReadAsStringAsync();
UpdateCustomSetConsole($"Failed: {response.StatusCode} - {errorText}");
}
client.Dispose();
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -159,8 +216,9 @@ namespace Lithium
{ {
try try
{ {
string path = "custom_set.txt"; File.WriteAllText("custom_set.txt",
File.WriteAllText(path, $"{OperatorNameTextBox.Text}|{RecoilXTextBox.Text}|{RecoilYTextBox.Text}|{(AttackerRadioButton.IsChecked == true ? "attacker" : "defender")}"); $"{OperatorNameTextBox.Text}|{RecoilXTextBox.Text}|{RecoilYTextBox.Text}|{(AttackerRadioButton.IsChecked == true ? "attacker" : "defender")}");
UpdateCustomSetConsole("Custom set saved"); UpdateCustomSetConsole("Custom set saved");
} }
catch catch
@@ -173,21 +231,23 @@ namespace Lithium
{ {
try try
{ {
string path = "custom_set.txt"; if (!File.Exists("custom_set.txt"))
if (!File.Exists(path))
{ {
UpdateCustomSetConsole("No saved set found"); UpdateCustomSetConsole("No saved set found");
return; return;
} }
string[] parts = File.ReadAllText(path).Split('|'); string[] parts = File.ReadAllText("custom_set.txt").Split('|');
if (parts.Length != 4) throw new Exception("Invalid file format"); if (parts.Length != 4) throw new Exception("Invalid file");
OperatorNameTextBox.Text = parts[0]; OperatorNameTextBox.Text = parts[0];
RecoilXTextBox.Text = parts[1]; RecoilXTextBox.Text = parts[1];
RecoilYTextBox.Text = parts[2]; RecoilYTextBox.Text = parts[2];
if (parts[3].ToLower() == "attacker") AttackerRadioButton.IsChecked = true;
else DefenderRadioButton.IsChecked = true; if (parts[3].Equals("attacker", StringComparison.OrdinalIgnoreCase))
AttackerRadioButton.IsChecked = true;
else
DefenderRadioButton.IsChecked = true;
UpdateCustomSetConsole("Custom set loaded"); UpdateCustomSetConsole("Custom set loaded");
} }
@@ -196,7 +256,5 @@ namespace Lithium
UpdateCustomSetConsole("Failed to load custom set"); UpdateCustomSetConsole("Failed to load custom set");
} }
} }
#endregion
} }
} }
+51 -75
View File
@@ -22,18 +22,23 @@ namespace Lua
public static List<string> attackerNames = new List<string>(); public static List<string> attackerNames = new List<string>();
public static List<string> defenderNames = new List<string>(); public static List<string> defenderNames = new List<string>();
public static List<string> setNames = new List<string>(); public static List<string> setNames = new List<string>();
public static int currentSetIndex = 0; public static int currentSetIndex = 0;
public static bool onAttackers = true; public static bool onAttackers = true;
// ======================================================
// ONLINE CONFIG URL
// ======================================================
private static string OnlineConfigUrl =>
string.IsNullOrEmpty(ConfigLoader.userName)
? null
: $"https://jj.giggity.gay/api/config/export?name={Uri.EscapeDataString(ConfigLoader.userName)}";
public static string ConfigExportUrl => public static string ConfigExportUrl =>
string.IsNullOrEmpty(ConfigLoader.userName) string.IsNullOrEmpty(ConfigLoader.userName)
? null ? null
: $"https://jj.giggity.gay/exindex.html?name={Uri.EscapeDataString(ConfigLoader.userName)}"; : $"https://jj.giggity.gay/exindex.html?name={Uri.EscapeDataString(ConfigLoader.userName)}";
// ====================================================== // ======================================================
// CURRENT SET + CURRENT OPERATOR // CURRENT SET + CURRENT OPERATOR
@@ -67,13 +72,21 @@ namespace Lua
} }
} }
// ======================================================
// GET CURRENT RECOIL
// ======================================================
public static (double recoilX, double recoilY) GetCurrentRecoil()
{
string op = CurrentOperator;
// Build online URL if (onAttackers && attackers.ContainsKey(op))
private static string OnlineConfigUrl => return attackers[op];
string.IsNullOrEmpty(ConfigLoader.userName)
? null
: $"https://jj.giggity.gay/api/config/export?name={Uri.EscapeDataString(ConfigLoader.userName)}";
if (!onAttackers && defenders.ContainsKey(op))
return defenders[op];
return (0, 0);
}
// ====================================================== // ======================================================
// LOAD CONFIG // LOAD CONFIG
@@ -99,10 +112,7 @@ namespace Lua
allLines.AddRange(txt.Split('\n')); allLines.AddRange(txt.Split('\n'));
} }
} }
catch catch { }
{
// ignored
}
} }
// ---------- LOCAL ---------- // ---------- LOCAL ----------
@@ -122,19 +132,14 @@ namespace Lua
if (line.StartsWith("--") || line.StartsWith("#")) continue; if (line.StartsWith("--") || line.StartsWith("#")) continue;
if (line.StartsWith("attackers", StringComparison.OrdinalIgnoreCase)) if (line.StartsWith("attackers", StringComparison.OrdinalIgnoreCase))
{ { inAtk = true; inDef = false; continue; }
inAtk = true; inDef = false; continue;
} if (line.StartsWith("defenders", StringComparison.OrdinalIgnoreCase))
if (line.StartsWith("defenders", StringComparison.OrdinalIgnoreCase)) { inAtk = false; inDef = true; continue; }
{
inAtk = false; inDef = true; continue; if (line == "}" || line == "]," || line == "],")
} { inAtk = false; inDef = false; continue; }
if (line == "}" || line == "]," || line == "],")
{
inAtk = false; inDef = false; continue;
}
// parse recoil line
if (Helper.TryParseRecoilLine(line, out var name, out var x, out var y)) if (Helper.TryParseRecoilLine(line, out var name, out var x, out var y))
{ {
if (inAtk) if (inAtk)
@@ -153,12 +158,10 @@ namespace Lua
MergeSets(); MergeSets();
RestoreFavorites(); RestoreFavorites();
// correct operator selection
if (setNames.Count > 0) if (setNames.Count > 0)
CurrentOperator = CurrentSet; CurrentOperator = CurrentSet;
} }
// ====================================================== // ======================================================
// MERGE // MERGE
// ====================================================== // ======================================================
@@ -167,11 +170,8 @@ namespace Lua
if (ConfigLoader.betaTest) if (ConfigLoader.betaTest)
{ {
mergedSets.Clear(); mergedSets.Clear();
foreach (var kv in attackers) mergedSets[kv.Key] = kv.Value;
foreach (var kv in attackers) foreach (var kv in defenders) mergedSets[kv.Key] = kv.Value;
mergedSets[kv.Key] = kv.Value;
foreach (var kv in defenders)
mergedSets[kv.Key] = kv.Value;
setNames = attackerNames.Concat(defenderNames) setNames = attackerNames.Concat(defenderNames)
.Distinct(StringComparer.OrdinalIgnoreCase) .Distinct(StringComparer.OrdinalIgnoreCase)
@@ -192,27 +192,19 @@ namespace Lua
currentSetIndex = Helper.SafeClampIndex(currentSetIndex, setNames.Count); currentSetIndex = Helper.SafeClampIndex(currentSetIndex, setNames.Count);
} }
// ====================================================== // ======================================================
// RESTORE // RESTORE
// ====================================================== // ======================================================
public static void RestoreSet(string oldSet) public static void RestoreSet(string oldSet)
{ {
if (setNames.Count == 0) if (setNames.Count == 0) { currentSetIndex = 0; return; }
{
currentSetIndex = 0;
return;
}
int idx = setNames.FindIndex(s =>
string.Equals(s, oldSet, StringComparison.OrdinalIgnoreCase));
int idx = setNames.FindIndex(s => string.Equals(s, oldSet, StringComparison.OrdinalIgnoreCase));
currentSetIndex = idx >= 0 ? idx : 0; currentSetIndex = idx >= 0 ? idx : 0;
CurrentOperator = CurrentSet; CurrentOperator = CurrentSet;
} }
// ====================================================== // ======================================================
// SWITCH SIDE // SWITCH SIDE
// ====================================================== // ======================================================
@@ -225,7 +217,6 @@ namespace Lua
RestoreFavorites(); RestoreFavorites();
} }
// ====================================================== // ======================================================
// CYCLING // CYCLING
// ====================================================== // ======================================================
@@ -245,17 +236,12 @@ namespace Lua
CurrentOperator = CurrentSet; CurrentOperator = CurrentSet;
} }
// ====================================================== // ======================================================
// FAVORITES // FAVORITES
// ====================================================== // ======================================================
private static void RestoreFavorites() private static void RestoreFavorites()
{ {
if (setNames.Count == 0) if (setNames.Count == 0) { currentSetIndex = 0; return; }
{
currentSetIndex = 0;
return;
}
if (ConfigLoader.betaTest) if (ConfigLoader.betaTest)
{ {
@@ -264,7 +250,6 @@ namespace Lua
{ {
currentSetIndex = setNames.FindIndex(s => currentSetIndex = setNames.FindIndex(s =>
string.Equals(s, ConfigLoader.favoriteAttackers, StringComparison.OrdinalIgnoreCase)); string.Equals(s, ConfigLoader.favoriteAttackers, StringComparison.OrdinalIgnoreCase));
CurrentOperator = CurrentSet; CurrentOperator = CurrentSet;
return; return;
} }
@@ -274,7 +259,6 @@ namespace Lua
{ {
currentSetIndex = setNames.FindIndex(s => currentSetIndex = setNames.FindIndex(s =>
string.Equals(s, ConfigLoader.favoriteDefenders, StringComparison.OrdinalIgnoreCase)); string.Equals(s, ConfigLoader.favoriteDefenders, StringComparison.OrdinalIgnoreCase));
CurrentOperator = CurrentSet; CurrentOperator = CurrentSet;
return; return;
} }
@@ -284,34 +268,26 @@ namespace Lua
return; return;
} }
// non-beta side-based if (onAttackers && !string.IsNullOrEmpty(ConfigLoader.favoriteAttackers) &&
if (onAttackers) setNames.Contains(ConfigLoader.favoriteAttackers, StringComparer.OrdinalIgnoreCase))
{ {
if (!string.IsNullOrEmpty(ConfigLoader.favoriteAttackers) && currentSetIndex = setNames.FindIndex(s =>
setNames.Contains(ConfigLoader.favoriteAttackers, StringComparer.OrdinalIgnoreCase)) string.Equals(s, ConfigLoader.favoriteAttackers, StringComparison.OrdinalIgnoreCase));
{ CurrentOperator = CurrentSet;
currentSetIndex = setNames.FindIndex(s => return;
string.Equals(s, ConfigLoader.favoriteAttackers, StringComparison.OrdinalIgnoreCase));
CurrentOperator = CurrentSet;
return;
}
} }
else
{
if (!string.IsNullOrEmpty(ConfigLoader.favoriteDefenders) &&
setNames.Contains(ConfigLoader.favoriteDefenders, StringComparer.OrdinalIgnoreCase))
{
currentSetIndex = setNames.FindIndex(s =>
string.Equals(s, ConfigLoader.favoriteDefenders, StringComparison.OrdinalIgnoreCase));
CurrentOperator = CurrentSet; if (!onAttackers && !string.IsNullOrEmpty(ConfigLoader.favoriteDefenders) &&
return; setNames.Contains(ConfigLoader.favoriteDefenders, StringComparer.OrdinalIgnoreCase))
} {
currentSetIndex = setNames.FindIndex(s =>
string.Equals(s, ConfigLoader.favoriteDefenders, StringComparison.OrdinalIgnoreCase));
CurrentOperator = CurrentSet;
return;
} }
currentSetIndex = 0; currentSetIndex = 0;
CurrentOperator = CurrentSet; CurrentOperator = CurrentSet;
} }
} }
} }
+4 -4
View File
@@ -1,5 +1,4 @@
// RecoilControl.cs (patched) using System;
using System;
using System.Threading; using System.Threading;
namespace Lua namespace Lua
@@ -41,7 +40,7 @@ namespace Lua
if (!Utils.IsPressed(VK_LBUTTON)) if (!Utils.IsPressed(VK_LBUTTON))
return; return;
var setName = OperatorSets.CurrentSet; string setName = OperatorSets.CurrentSet;
if (!OperatorSets.mergedSets.TryGetValue(setName, out var recoil)) if (!OperatorSets.mergedSets.TryGetValue(setName, out var recoil))
return; return;
@@ -87,6 +86,7 @@ namespace Lua
moveY *= 1.351; moveY *= 1.351;
} }
// CAST doubles to int to fix compiler errors
int ix = (int)Math.Round(moveX); int ix = (int)Math.Round(moveX);
int iy = (int)Math.Round(moveY); int iy = (int)Math.Round(moveY);
@@ -96,4 +96,4 @@ namespace Lua
Utils.MoveMouse(ix, iy); Utils.MoveMouse(ix, iy);
} }
} }
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.