Repository navigation
Make teleports move the player again on 2.1 - #1681
Merged
Merged
Conversation
lex
force-pushed
the
fix-teleport-remote-view
branch
from
November 9, 2026 19:28
4b54b0f to
5389075
Compare
Players reported that the Teleport button on train stations stopped working on 2.1: it centred the view on the station and said "You have been teleported", but the player stayed where they were. Admins said /tp didn't work either. On 2.1, LuaPlayer.teleport moves only the camera while the player is looking at the map, which is where a far station's window is opened from. Utils.teleport_player teleports the player's character instead, or the player when they have none (god, spectator, dead). The train station button, /tp, /invoke, the train saviour, the antigrief surface switch, Frontier's lobby, spawn control and the Space Race, Quadrants, Tetris and Dimensions teleports use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lex
force-pushed
the
fix-teleport-remote-view
branch
from
November 9, 2026 19:36
5389075 to
81ab242
Compare
grilledham
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Players reported that the Teleport button on train stations stopped working on 2.1: clicking it centres the view on the destination station and prints "You have been teleported", but the player stays where they were. Admins said
/tpdoesn't work either.On 2.1,
LuaPlayer.teleportmoves only the camera while the player is looking at the map, which is where a far station's window is opened from. Teleporting the player's character (player.character.teleport) moves the character even while the player is looking at the map, also to another surface. New code that moves a player should useUtils.teleport_player.Changes
Utils.teleport_player(player, position, surface, raise_teleported)inutils/core.luateleports the player's character, or the player when they have none (god, spectator, dead)./tp(selected entity, player, and tp mode),/invoke, the train saviour, the antigrief surface switch (from the physical position and surface), Frontier's lobby, spawn control, and the Space Race, Quadrants, Tetris and Dimensions teleports.Tests
Five
skip-headlesstests, since they need a player:utils/Core/teleport_player: from the map, the character moves and the view stays; from the map, the character moves to another surface; a player with no character is teleported.features/admin_commands:/tpon a chest selected from the map moves the character to it.features/train_station_teleport: clicking Teleport on a far station opened from the map moves the character to it.All five pass in a 2.1.24 client, and the four map tests fail with
LuaPlayer.teleportin the helper. Headless Frontier and Diggy pass. luacheck: 0 warnings / 0 errors.🤖 Generated with Claude Code