From f7b296f43b63d1ced271da4e9778f435da625969 Mon Sep 17 00:00:00 2001 From: min Date: Tue, 9 Jun 2026 22:43:40 +0300 Subject: [PATCH] =?UTF-8?q?fix(g39):=203D-=D0=B4=D0=B8=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D1=86=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20distance-check?= =?UTF-8?q?=20=D0=BC=D0=B5=D1=81=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8 мест-призраков стоят один над другим (x=0, z=0, y=1,3,5,...). По X+Z они в (0,0) → все 8 видят hintVisible=true одновременно → нажатие E срабатывало у всех сразу, башня строилась за раз. Фикс: 3D-дистанция (учитываем dy). --- src/community/docsGamesBuildersLua.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/community/docsGamesBuildersLua.js b/src/community/docsGamesBuildersLua.js index f00f2a3..f775cc2 100644 --- a/src/community/docsGamesBuildersLua.js +++ b/src/community/docsGamesBuildersLua.js @@ -3566,10 +3566,14 @@ local hintVisible = false RunService.Heartbeat:Connect(function() if built then return end local px = __rbxl_player_x() + local py = __rbxl_player_y() local pz = __rbxl_player_z() local dx = part.Position.X - px + local dy = part.Position.Y - py local dz = part.Position.Z - pz - local dist = math.sqrt(dx*dx + dz*dz) + -- 3D-дистанция — иначе 8 мест-призраков один над другим + -- все видят hintVisible=true (по X+Z они в (0,0,0)) + local dist = math.sqrt(dx*dx + dy*dy + dz*dz) local near = dist <= 4 if near ~= hintVisible then hintVisible = near