Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

What's wrong with my move fix?

cr0w

New member
Joined
Mar 7, 2022
Messages
61
Reaction score
9
Points
0
Hello again!
Today I want to ask why exactly I still get flagged by anticheats like AAC or GRIM for my movement.

This is my code for the fix:
Java:
fun fixVelocity(velocityEvent: PlayerVelocityEvent, yaw: Float): PlayerVelocityEvent {
    val movementInput = velocityEvent.movementInput.lengthSquared()
    val velo =
        if (movementInput < 0.001) {
            Vec3d(0.0, 0.0, 0.0)
        } else {
            var vec3d =
                if (movementInput > 1.0) velocityEvent.movementInput.normalize() else velocityEvent.movementInput

            vec3d = vec3d.multiply(velocityEvent.speed.toDouble())

            val sinYaw = MathHelper.sin(Math.toRadians(yaw.toDouble()).toFloat())
            val cosYaw = MathHelper.cos(Math.toRadians(yaw.toDouble()).toFloat())
            Vec3d(
                vec3d.x * cosYaw.toDouble() - vec3d.z * sinYaw.toDouble(),
                vec3d.y,
                vec3d.z * cosYaw.toDouble() + vec3d.x * sinYaw.toDouble()
            )
        }


    velocityEvent.velo = velo
    return velocityEvent
}
firstly I check if the movement is even relevant even more.
if it is just a bit i normalize the movement,
Now i adjust the x and z by the values of the sin and cos to lower the movement.
is anything wrong here?
 
From what i see there is nothing inherently wrong with the movement fix itself, you are probably just setting the yaw to target rotation instead of the true server rotation, that is often a mistake so you need to make sure that the rotation you are setting is the rotation that has been sent in the last C03 Packet
 
From what i see there is nothing inherently wrong with the movement fix itself, you are probably just setting the yaw to target rotation instead of the true server rotation, that is often a mistake so you need to make sure that the rotation you are setting is the rotation that has been sent in the last C03 Packet
Just checked if thats the issue, but nope :(
Here a video of it: https://streamable.com/ddrssy
I know why the reach flags accure, judging by the open source code of grim attack even though not being in the hitbox. I will fix that later on.
But Im not sure why exactly I get flagged for my movement.
 
possible thins:
packet order
hit slowdown
 
packet order
I feel like my packet order is just fine, since I only modify packets besides the attack packet and swing packet.
I tested it on other ACs like matrix, which flagged my movement and not my packet order.
So I guess it has to be the hit slowdown. I will check the mc code how it does it.
But ClientPlayerEntity#attack(entity) should already include the slowdown, or not?
 
no? it does not include hit slowdown
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top