From bb5c1a7316391e2cf5d3ff87314dd30584361d2d Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Thu, 14 May 2026 11:02:06 -0700 Subject: [PATCH] Reduce NPC proximity threshold from 120 to 60px so Press E shows only when truly close --- game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game.js b/game.js index 31d4d48..3055180 100644 --- a/game.js +++ b/game.js @@ -238,7 +238,7 @@ class Game { const viewH = world ? world.parentElement.offsetHeight : 300; const playerWorldX = this.state.worldX + viewW / 2; const dx = Math.abs(playerWorldX - this.state.npcWorldX); - const near = dx < 120; + const near = dx < 60; const hint = document.getElementById('map-talk-hint'); const bub = document.getElementById('npc-bubble'); @@ -267,7 +267,7 @@ class Game { const world = document.getElementById('map-inner'); const viewW = world ? world.parentElement.offsetWidth : 420; const playerWorldX = this.state.worldX + viewW / 2; - return Math.abs(playerWorldX - this.state.npcWorldX) < 120; + return Math.abs(playerWorldX - this.state.npcWorldX) < 60; } _talkToNPC() {