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

Teleporter should teleport the player to itself, not to the teleporter nearest to the player #12

Open
rdococ opened this issue May 1, 2020 · 1 comment

Comments

@rdococ
Copy link

rdococ commented May 1, 2020

At the moment, when the teleporter tries to teleport a player, it teleports them to the nearest teleporter to them. This is strange behavior, and hugely limits what you could do with teleporters. It would make much more sense if activating a teleporter teleported a nearby player to only that one teleporter, and not any other.

@paly2
Copy link
Collaborator

paly2 commented May 1, 2020

Actually, the current behavior is more complex than that: a teleporter, when it is activated, will teleport players to itself (even if there is another teleporter closer to the player) unless there is another teleporter within 50 nodes with exactly two coordinates identical to the coordinates of the activated teleporter, in which case it will teleport players to the closest teleporter that meets this condition.
It is true that this is very unnatural. The original idea for this approach is that it makes it possible to teleport players to non-active chunks, which would not be possible if only the second behavior were available, as teleporters can only be activated in active chunks. If this behavior were changed now, it may break many existing systems.
On the other hand, it is true that systematically teleporting players to the teleporter itself would simplify both usage and code. I have to think about it a little, but I will probably change it.

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

No branches or pull requests

2 participants