🚀 Added (New Features)
• Custom Set Builder Testing Mode: The Custom Set Builder tab now functions as a live recoil testing tool. When toggled ON while the tab is active, the custom X/Y recoil values are applied instead of the selected operator's recoil, allowing real-time dial-in of recoil sets. Switching to any other tab automatically restores normal operator recoil.
📂 File-Level Changes Summary
• MainWindow.xaml: Named TabControl and added SelectionChanged handler for tab tracking.
• MainWindow.xaml.cs: Added UpdateCustomSetState() to sync custom recoil mode with RecoilEngine based on tab focus and toggle state.
• RecoilEngine.cs: Added CustomModeActive, CustomRecoilX, CustomRecoilY fields; HandleRecoilTick() checks custom mode first before falling back to mergedSets lookup.
This commit is contained in:
+13
-2
@@ -20,6 +20,10 @@ namespace Lua
|
||||
private static double _remainderX, _remainderY;
|
||||
private static double _jitterMultiplierX, _jitterMultiplierY;
|
||||
|
||||
public static bool CustomModeActive = false;
|
||||
public static double CustomRecoilX = 0;
|
||||
public static double CustomRecoilY = 0;
|
||||
|
||||
private static bool IsDown(int key)
|
||||
{
|
||||
return (GetAsyncKeyState(key) & 0x8000) != 0;
|
||||
@@ -61,12 +65,19 @@ namespace Lua
|
||||
{
|
||||
try
|
||||
{
|
||||
int now = Environment.TickCount;
|
||||
|
||||
if (CustomModeActive)
|
||||
{
|
||||
HandleJitter(now);
|
||||
ApplyRecoil((CustomRecoilX, CustomRecoilY));
|
||||
return;
|
||||
}
|
||||
|
||||
string setName = OperatorSets.CurrentSet;
|
||||
|
||||
if (!OperatorSets.mergedSets.TryGetValue(setName, out var recoil)) return;
|
||||
|
||||
int now = Environment.TickCount;
|
||||
|
||||
HandleJitter(now);
|
||||
ApplyRecoil(recoil);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user