Added new Aim check and utils

- Fixed TickTimer not functioning
- Fixed generalCancel always cancelling
- Removed debug from places that I am not currently in need of debugging
- Attempting to fix login error when reloading when injecting packethandler
- Added sensitivity to playerInfo command
- Fixed runaway buffer fp on Fly (A)
This commit is contained in:
Dawson
2022-08-11 13:25:57 -04:00
parent 234744e98d
commit f75657744a
12 changed files with 684 additions and 31 deletions
@@ -26,6 +26,13 @@ public class MathUtils {
return playerMoved(from.toVector(), to.toVector());
}
public static float gcdSmall(float current, float previous) {
if(current < previous) return gcdSmall(Math.abs(previous), Math.abs(current));
//The larger number has to be first.
return (Math.abs(previous) <= 0.001f) ? current : gcdSmall(previous,
current - (float)Math.floor(current / previous) * previous);
}
public static double getDistanceWithoutRoot(KLocation one, KLocation two) {
double deltaX = one.x - two.x, deltaY = one.y - two.y, deltaZ = one.z - two.z;