Teleport to players further away than skaters are shown

/tp refused anyone without a skater built here ("is not in the world
right now"). Since skaters are only built within the player distance
(120 m by default), that left only players already nearby: a player far
from everyone could teleport to nobody. The Social menu's teleport failed
for the same players, as the game was only told where a player was while
their skater was built.

- /tp goes to where the player was last heard to be, skater or not. Poses
  keep arriving for far players (their name or dot is placed by them), so
  distance no longer matters. Only a player no pose has placed yet is
  refused.
- The game's party position is kept up to date for far players too, for
  the Social menu's teleport.

No protocol or server change. /tp is not tested in game; the Social menu
path follows from the code and is not tested either. Spectate from the
Social menu may now accept far players and show the place without a
skater.
This commit is contained in:
AyeZeeBB committed 2026-10-10 22:43:09 -05:00
1 parent d1e6afc951
commit 63c9e39c2a
2 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -648,7 +648,9 @@ void render(Session &s, std::uintptr_t client, const NativeFrame &local, std::ui
p.native_status = !p.shown_wanted ? "Further away than players are shown."
: sampled ? "Waiting for the player's cosmetic recipe."
: "Waiting for player poses.";
// No skater for them, but still their name or dot where they are.
// No skater for them, but still their name or dot where they are, and where the
// Social menu's teleport and spectate find them.
if (!p.shown_wanted && sampled) update_party_position(&p.render_pose);
if (!p.shown_wanted && sampled && labels) label(p);
}
}
@@ -196,7 +196,10 @@ std::string teleport_self(Session &s, std::string_view argument) {
std::string error;
auto *p = find_player(s, argument, error);
if (!p) return error;
if (!p->visible) return peer_name(s, *p) + " is not in the world right now.";
// Where they were last heard to be: a player further away than skaters are shown has no
// skater here, and is exactly who a teleport is for. Only one no pose has placed yet has
// nowhere to go to.
if (!p->placed) return peer_name(s, *p) + " is not in the world right now.";
at = p->render_pose.root.position;
at[0] += 2.0f; // beside them, not inside
at[1] += 1.0f;