From b6a7c6b0884963498542576f2cd0e6a5b24dddec Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Thu, 21 May 2026 09:05:38 -0700 Subject: [PATCH] Fix player idle sprite to face last walked direction instead of always facing forward --- game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game.js b/game.js index fbce8a6..590c2c1 100644 --- a/game.js +++ b/game.js @@ -387,7 +387,7 @@ class Game { /* Show the idle/middle frame for the last direction walked Frames at 2× scale (32px each): down=32, up=128, left=224, right=320 */ const idleFrames = { right:'-32px', down:'-32px', left:'-128px', up:'-224px' }; - p.style.backgroundPositionX = idleFrames[this.state.pathDir] || '-32px'; + p.style.backgroundPositionX = idleFrames[this.state.lastDir] || '-32px'; } } }