Skip to content

Commit ff31e33

Browse files
authored
Merge pull request #1557 from camilia2o7/Aimmy-V2
New features, bug fixes, and ect. - #1557
2 parents 16d8173 + 389cf5f commit ff31e33

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

Aimmy2/Class/Dictionary.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public static class Dictionary
2020
{ "Disable Anti Recoil Keybind", "Oem6"},
2121
{ "Gun 1 Key", "D1"},
2222
{ "Gun 2 Key", "D2"},
23+
// Key binds for toggles
24+
{ "Aim Assist TKB", ""},
25+
{ "Constant AI Tracking TKB", ""},
26+
{ "Predictions TKB", ""},
27+
{ "EMA Smoothening TKB", ""},
28+
{ "Sticky Aim TKB", ""}
2329
};
2430

2531
public static Dictionary<string, dynamic> sliderSettings = new()

Aimmy2/MainWindow.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,13 @@ private void HandleKeybindPressed(string bindingId)
728728
["Anti Recoil Keybind"] = () => HandleAntiRecoil(true),
729729
["Disable Anti Recoil Keybind"] = DisableAntiRecoil,
730730
["Gun 1 Key"] = () => LoadGunConfig("Gun 1 Config"),
731-
["Gun 2 Key"] = () => LoadGunConfig("Gun 2 Config")
731+
["Gun 2 Key"] = () => LoadGunConfig("Gun 2 Config"),
732+
// Keybinds for toggles
733+
["Aim Assist TKB"] = () => uiManager.T_AimAligner.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)),
734+
["Constant AI Tracking TKB"] = () => uiManager.T_ConstantAITracking.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)),
735+
["Predictions TKB"] = () => uiManager.T_Predictions.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)),
736+
["EMA Smoothening TKB"] = () => uiManager.T_EMASmoothing.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)),
737+
["Sticky Aim TKB"] = () => uiManager.T_StickyAim.Reader.RaiseEvent(new RoutedEventArgs(Button.ClickEvent))
732738
};
733739

734740
handlers.GetValueOrDefault(bindingId)?.Invoke();

Aimmy2/MouseMovementLibraries/RazerSupport/RZMouse.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,38 @@ public static async Task<bool> Load()
5757
await DownloadRzctl(rzctlDownloadUrl_Release);
5858
return false;
5959
}
60+
// Hopefully this method will solve the issue for the users who have/don't have the drivers
61+
// If the user gets this error, Failed to initialize Razer mode, then it will attempt to download the Release version.
62+
// And if that still doesn't work, then it will error again, which in this case would mean they don't have the driver for vs &&|| vc 2015–2022
63+
catch (Exception ex)
64+
{
65+
MessageBox.Show($"Failed to initialize Razer mode.\n{ex.Message}\n\n" +
66+
"Attempting to replace rzctl.dll with the release version...",
67+
"Initialization Error", MessageBoxButton.OK, MessageBoxImage.Error);
68+
try
69+
{
70+
if (File.Exists(rzctlpath))
71+
File.Delete(rzctlpath);
72+
73+
await DownloadRzctl(rzctlDownloadUrl_Release);
74+
75+
new NoticeBar("rzctl.dll replaced with release version. Please retry loading.", 5000).Show();
76+
}
77+
catch (Exception innerEx)
78+
{
79+
MessageBox.Show($"Failed to recover rzctl.dll.\n{innerEx.Message}",
80+
"Recovery Error", MessageBoxButton.OK, MessageBoxImage.Error);
81+
}
82+
return false;
83+
}
84+
/* Commenting this method out to replace with a more enhanced version
6085
catch (Exception ex)
6186
{
6287
MessageBox.Show($"Failed to initialize Razer mode.\n{ex.Message}",
6388
"Initialization Error", MessageBoxButton.OK, MessageBoxImage.Error);
6489
return false;
6590
}
91+
*/
6692
}
6793
#region Razer Synapse & Device Checks
6894

Aimmy2/UISections/AimMenuControl.xaml.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ private void LoadAimAssist()
171171
}
172172
};
173173
})
174+
.AddKeyChanger("Aim Assist TKB")
174175
.AddKeyChanger("Aim Keybind", k => uiManager.C_Keybind = k)
175176
.AddKeyChanger("Second Aim Keybind")
176177
.AddToggle("Sticky Aim", t => uiManager.T_StickyAim = t)
178+
.AddKeyChanger("Sticky Aim TKB")
177179
.AddToggle("Constant AI Tracking", t =>
178180
{
179181
uiManager.T_ConstantAITracking = t;
@@ -194,8 +196,11 @@ private void LoadAimAssist()
194196
}
195197
};
196198
})
199+
.AddKeyChanger("Constant AI Tracking TKB")
197200
.AddToggle("Predictions", t => uiManager.T_Predictions = t)
201+
.AddKeyChanger("Predictions TKB")
198202
.AddToggle("EMA Smoothening", t => uiManager.T_EMASmoothing = t)
203+
.AddKeyChanger("EMA Smoothening TKB")
199204
.AddKeyChanger("Emergency Stop Keybind", k => uiManager.C_EmergencyKeybind = k)
200205
.AddToggle("Enable Model Switch Keybind", t => uiManager.T_EnableModelSwitchKeybind = t)
201206
.AddKeyChanger("Model Switch Keybind", k => uiManager.C_ModelSwitchKeybind = k)
@@ -512,9 +517,10 @@ private void LoadESPConfig()
512517
{
513518
d.DropdownBox.SelectedIndex = 0;
514519
uiManager.D_TracerPosition = d;
515-
_mainWindow.AddDropdownItem(d, "Bottom");
516-
_mainWindow.AddDropdownItem(d, "Middle");
520+
// Changed the positions of these as top is above middle & bottom - ts (this) bothered me so i had to
517521
_mainWindow.AddDropdownItem(d, "Top");
522+
_mainWindow.AddDropdownItem(d, "Middle");
523+
_mainWindow.AddDropdownItem(d, "Bottom");
518524
d.DropdownBox.SelectionChanged += (s, e) =>
519525
{
520526
if (Dictionary.toggleState["Show Detected Player"])

0 commit comments

Comments
 (0)