#(pgini) Finding better ways to perform a radius check

12 messages · Page 1 of 1 (latest)

balmy barn
#

In my plugin there is a "rune" which allows you to fly, this has a certain radius, the issue I'm experiencing is when players quickly switch between two flight runes
eg: someone flies from runeA to runeB, their flight still gets revoked for a second before runeB reapplies it, I am trying to prevent it except I'm having some issues with execution

ashen notchBOT
#

(pgini) Finding better ways to perform a radius check

ashen notchBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

balmy barn
#

!pastejava

leaden muskBOT
balmy barn
#

Lines 60-69 is where I started trying to fix it by adding a delay, except I also need to check whether the player is in a new rune's radius

#

The radius check I have wouldn't work since it only checks the radius to the player's current rune instance, and not the one they move into

#

I thought about looping the save file for the rune's location and check if the player enters another rune but that feels not really lag friendly

balmy barn
#

Soo yeah, I'm trying to find some other method that hopefully doesn't consist of iterating over ridiculous amounts of potential lines in a save file