-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Velocity): Strafe OnlyFacing option #5467
feat(Velocity): Strafe OnlyFacing option #5467
Conversation
val target = world.findEnemy(0f..OnlyFacing.range) | ||
val isFacingEnemy = facingEnemy( | ||
target!!, | ||
OnlyFacing.range.toDouble(), | ||
RotationManager.currentRotation ?: player.rotation | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to the game tick, as we are dealing with packets running in a different thread causing concurrent modification.
if (!isFacingEnemy) { | ||
shouldStrafe = false | ||
return@handler | ||
} | ||
|
||
shouldStrafe = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!isFacingEnemy) { | |
shouldStrafe = false | |
return@handler | |
} | |
shouldStrafe = true | |
shouldStrafe = isFacingEnemy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah xd
No description provided.