Update the target player location during travels
tschaffter opened this issue ยท 3 comments
It seems that the destination point when travelling to a player is taken once when entering the command /dt ptravel . However, the target player may have moved a large distance since then depending on the duration of the travel, which results in landing far away from him.
Would it be possible to grab from time to time during the travel the current location of the target player before updating the landing point? I only did some tests on relatively short travels (<1 min) so maybe it's already implemented for longer ones (destination updated every minutes, for instance). When the travel starts from far away, first update the destination every few minutes or so. During the travel and when moving closer to the target, reduce the update rate to a few seconds.
When the player teleports "out of reach", the dragon could hover or land directly beneath it or on the closest solid block. You could also play an "animation" where the dragon starts flying in circle (one or two revolutions) as to indicate that it lost track of the target (and then land). A message could be displayed to the player riding the dragon.
What do you propose in case the player teleports over a huge distance or to another world?
I think, it wouldn't be a good idea to permanently follow the player until we reach him...