Skip to content

Commit ff58917

Browse files
authored
fix
1 parent cfda475 commit ff58917

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

DLL/ClassLibrary1/Class1.cs

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
using InputInterceptorNS;
1+
using InputInterceptorNS;
22
using System;
33
using System.Runtime.InteropServices;
44
using System.Linq;
55
using System.Threading;
6+
using System.Reflection;
67

78
namespace ClassLibrary1
89
{
@@ -46,19 +47,9 @@ public void simulate_E()
4647

4748
public void move_mouse(float x, float y, int box_size, float x_multiplier, float y_multiplier, float y_diff)
4849
{
49-
float xr;
50-
if (x > box_size)
51-
{
52-
xr = -(960 - x);
53-
if ((xr + 960) > 1920)
54-
{
55-
xr = 0;
56-
}
57-
}
58-
else
59-
{
60-
xr = x;
61-
}
50+
51+
float speedMultiplier = (x_multiplier - 10) / (10);
52+
short xf;
6253
float yr;
6354
if (y > box_size)
6455
{
@@ -72,18 +63,15 @@ public void move_mouse(float x, float y, int box_size, float x_multiplier, float
7263
{
7364
yr = y;
7465
}
75-
int yf = (int)((yr - y_diff) * y_multiplier);
76-
int xf = (int)(xr * x_multiplier);
77-
/*float speedMultiplier = (x_multiplier - 10) / (10);
78-
short xf;
79-
if (x > box_size)
66+
if (x < 0)
8067
{
81-
xf = (short)(x / ((x * (-1 * speedMultiplier) + 100) / 200) / (2 + 3.3 / x_multiplier));
68+
xf = (short)(x / ((x * (-1 * speedMultiplier) + 100) / 200) / (2 + 3.3 / x_multiplier));
8269
}
8370
else
8471
{
85-
xf = (short)((x * -1) / ((((x * - 1) *(speedMultiplier) + 100) * -1)/200 / 2 + 3.3/ x_multiplier));
86-
}*/
72+
xf = (short)((x * -1) / ((((x * -1) * (-1 * speedMultiplier) + 100) * -1) / 200) / (2 + 3.3 / x_multiplier));
73+
}
74+
int yf = (int)((yr - y_diff) * y_multiplier);
8775
only_move_mouse(xf, yf);
8876
Thread.Sleep(5);
8977
// click_mouse();

0 commit comments

Comments
 (0)