Skip to content
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

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

EclipsesDev
Copy link
Contributor

No description provided.

@EclipsesDev EclipsesDev requested a review from 1zun4 January 27, 2025 13:32
Comment on lines 61 to 66
val target = world.findEnemy(0f..OnlyFacing.range)
val isFacingEnemy = facingEnemy(
target!!,
OnlyFacing.range.toDouble(),
RotationManager.currentRotation ?: player.rotation
)
Copy link
Member

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.

Comment on lines 68 to 73
if (!isFacingEnemy) {
shouldStrafe = false
return@handler
}

shouldStrafe = true
Copy link
Member

@1zun4 1zun4 Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!isFacingEnemy) {
shouldStrafe = false
return@handler
}
shouldStrafe = true
shouldStrafe = isFacingEnemy

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah xd

@1zun4 1zun4 added this to the 0.25.1 milestone Jan 29, 2025
@1zun4 1zun4 merged commit 8f4b686 into CCBlueX:nextgen Jan 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants