From 3edbed463b483ad06231b03bdf6597624703f03b Mon Sep 17 00:00:00 2001 From: Angda Song Date: Wed, 4 May 2022 14:13:23 -0700 Subject: [PATCH] Update teleport docs and allow overriding Y coord when teleporting --- README.md | 12 +++++++----- README_zh-CN.md | 6 ++++++ .../server/packet/recv/HandlerMarkMapReq.java | 4 +--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fd035f560..8119b3f30 100644 --- a/README.md +++ b/README.md @@ -143,11 +143,13 @@ There is a dummy user named "Server" in every player's friends list that you can ### Bonus -When you want to teleport to somewhere, use the ingame marking function on Map, click Confirm. You will see your -character falling from a very high destination, exact location that you marked. - -You can also specify a set Y coordinate by renaming the map marker. - +- Teleporting + - When you want to teleport to somewhere, use the in-game marking function on Map. + - Mark a point on the map using the fish hook marking (the last one.) + - (Optional) rename the map marker to a number to override the default Y coordinate (height, default 300.) + - Confirm and close the map. + - You will see your character falling from a very high destination, exact location that you marked. + # Quick Troubleshooting * If compiling wasn't successful, please check your JDK installation (JDK 17 and validated JDK's bin PATH variable) diff --git a/README_zh-CN.md b/README_zh-CN.md index 21c391767..4b4d57131 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -145,6 +145,12 @@ chmod +x gradlew ### 额外功能 当你想传送到某个地点, 只需要在地图中创建标记, 关闭地图后即可到达目标地点上空 +- 传送 + - 当你想传送到某个地点时,可以使用游戏里的地图标记功能。 + - 用鱼钩(最后一个图标)在地图上标记一个点位。 + - (可选) 将标记名称改为数字,即可修改传送位置的Y坐标(高度,缺省值是300)。 + - 确认添加标记,并关闭地图。 + - 你会看到你的角色从你选定点位的正上方高空落下。 # 快速排除问题 diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerMarkMapReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerMarkMapReq.java index 55b9fcfa6..fc5d0a602 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerMarkMapReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerMarkMapReq.java @@ -70,9 +70,7 @@ public class HandlerMarkMapReq extends PacketHandler { } private void teleport(Player player, MapMark mapMark) { - // Increased height means you can fly to the top of dragonspine now, - // at the cost of slightly longer falling to your destination. - float y = 700; + float y = isInt(mapMark.getName()) ? Integer.parseInt(mapMark.getName()) : 300; float x = mapMark.getPosition().getX(); float z = mapMark.getPosition().getZ(); player.getPos().set(x, y, z);