Skip to content

Commit

Permalink
Improve Chunk Priority, Frustum Priority and Load Speed Algorithms
Browse files Browse the repository at this point in the history
Fix bug where mojang has a -90 modifier in yaw resulting in us calculating
chunks to the players left rather than in front of them.

Drastically improve Frustum Prioritization function to reduce lag from its
calculations (Found it was being spammed really heavy on world add/teleport)

Also improved the logic behind choosing chunks to prioritize.

Add Priority tickets to a radius of 3 on any login, world chnge or teleport

This should help improve world load / chunk sending upon a player changing
locations by loading those chunks faster.

Improved the Player Ticket Delayer to be a little bit smarter about delays to
let closer chunks load a bit faster and only delay the farther out ones more.

This update will provide significant improvements to priority of chunks and
reduce the cpu cost of doing these calculations.

Fixes PaperMC#3530
  • Loading branch information
aikar committed Jun 10, 2020
1 parent 146b990 commit 64666dc
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 110 deletions.
Loading

0 comments on commit 64666dc

Please sign in to comment.