From ef374b0378a552d657a2952b2bc48a300977d340 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Wed, 20 May 2026 21:05:45 -0700 Subject: [PATCH] Move _generateTrees() to after npcWorldX is set so trees span the full path --- game.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game.js b/game.js index c99d90f..5dc7d91 100644 --- a/game.js +++ b/game.js @@ -1031,7 +1031,6 @@ class Game { /* We need the viewport size — defer a tick so the DOM is laid out */ requestAnimationFrame(() => { - this._generateTrees(); const world = document.getElementById('map-inner'); const viewW = world ? world.parentElement.offsetWidth : 420; @@ -1049,6 +1048,8 @@ class Game { this.state.npcWorldY = 0; } + this._generateTrees(); + document.getElementById('hud-name').textContent = this.state.playerName||'ASH'; this.updateHUD();