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

fixed lags caused by ghasts in high distances #100

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

GameHerobrine
Copy link
Contributor

The lags were caused by the loop in EntityGhast::a which used distance from entity to 0/0/0 after spawning(d3).
If the ghast spawned far from 0/0/0 (in farlands, for example), it would have to get entities ~12m times.

Copy link
Contributor

@notdevcody notdevcody left a comment

Choose a reason for hiding this comment

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

lgtm

@moderatorman
Copy link
Collaborator

did you test and confirm this works? i don't really understand how the change fixes the problem, but maybe i'm missing something.

@GameHerobrine
Copy link
Contributor Author

did you test and confirm this works? i don't really understand how the change fixes the problem, but maybe i'm missing something.

i tested it and it works. you can check it by teleporing to12550800 in the nether and moving deeper into farlands(which caused the test server to freeze for 49 seconds without this patch)

@moderatorman
Copy link
Collaborator

alrighty, awesome. i'll go ahead and merge it then.

Copy link
Collaborator

@moderatorman moderatorman left a comment

Choose a reason for hiding this comment

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

good to go

@moderatorman moderatorman merged commit 8c3fc96 into RhysB:master Aug 9, 2024
2 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.

3 participants