Optimize sending packets to nearby locations (sounds/effects)

Instead of using the entire world or player list, use the distance
maps to only iterate players who are even seeing the chunk the packet
is originating from.

This will drastically cut down on packet sending cost for worlds with
lots of players in them.

Closes #3437
This commit is contained in:
Aikar
2020-05-23 17:15:40 -04:00
parent 4ec22a4736
commit bfb789c862
3 changed files with 65 additions and 0 deletions

7
paper
View File

@@ -68,6 +68,13 @@ case "$1" in
ls -la Paper-Server/target/paper*.jar
) || failed=1
;;
"pc" | "paperclip")
(
set -e
cd "$basedir"
scripts/paperclip.sh "$basedir" || exit 1
) || failed=1
;;
"make")
(
if [[ "$2" = "bacon" ]] ; then