From e55ce908145e18e656a1961fd6f6ef4ae3ac2c37 Mon Sep 17 00:00:00 2001 From: hidwood <78058766+hidwood@users.noreply.github.com> Date: Sun, 1 Feb 2026 19:42:11 -0500 Subject: [PATCH] access: fix incorrect and misleading comments Fix copy-paste comment errors in SpellBookKeyPressed() that referred to "inventory" instead of "spellbook", and QuestLogKeyPressed() that said "character quest log" instead of "quest log". Correct a misleading FindPath comment in town NPC auto-walk, and update a stale SourceX path reference in diablo.cpp. Co-Authored-By: Claude Opus 4.5 --- Source/controls/accessibility_keys.cpp | 6 +++--- Source/controls/town_npc_nav.cpp | 2 +- Source/diablo.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/controls/accessibility_keys.cpp b/Source/controls/accessibility_keys.cpp index 39dd716ef..a619e4c77 100644 --- a/Source/controls/accessibility_keys.cpp +++ b/Source/controls/accessibility_keys.cpp @@ -195,7 +195,7 @@ void QuestLogKeyPressed() if (MousePosition.x > 160 && MousePosition.y < GetMainPanel().position.y) { SetCursorPos(MousePosition - Displacement { 160, 0 }); } - } else if (!CharFlag) { // We opened the character quest log + } else if (!CharFlag) { // We opened the quest log if (MousePosition.x < 480 && MousePosition.y < GetMainPanel().position.y) { SetCursorPos(MousePosition + Displacement { 160, 0 }); } @@ -248,11 +248,11 @@ void SpellBookKeyPressed() } } if (!IsLeftPanelOpen() && CanPanelsCoverView()) { - if (!SpellbookFlag) { // We closed the inventory + if (!SpellbookFlag) { // We closed the spellbook if (MousePosition.x < 480 && MousePosition.y < GetMainPanel().position.y) { SetCursorPos(MousePosition + Displacement { 160, 0 }); } - } else if (!invflag) { // We opened the inventory + } else if (!invflag) { // We opened the spellbook if (MousePosition.x > 160 && MousePosition.y < GetMainPanel().position.y) { SetCursorPos(MousePosition - Displacement { 160, 0 }); } diff --git a/Source/controls/town_npc_nav.cpp b/Source/controls/town_npc_nav.cpp index c7b50d065..97b2bc717 100644 --- a/Source/controls/town_npc_nav.cpp +++ b/Source/controls/town_npc_nav.cpp @@ -243,7 +243,7 @@ void UpdateAutoWalkTownNpc() return; } - // FindPath returns 0 if the path length is equal to the maximum. + // FindPath returns 0 when it fails to find a usable path. // The player walkpath buffer is MaxPathLengthPlayer, so keep segments strictly shorter. if (steps < static_cast(MaxPathLengthPlayer)) { const int townerIdx = AutoWalkTownNpcTarget; diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 12dedc5e5..f936badea 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -168,7 +168,7 @@ GameLogicStep gGameLogicStep = GameLogicStep::None; PlayerActionType LastPlayerAction = PlayerActionType::None; // Controller support: Actions to run after updating the cursor state. -// Defined in SourceX/controls/plctrls.cpp. +// Defined in Source/controls/plrctrls.cpp. extern void plrctrls_after_check_curs_move(); extern void plrctrls_every_frame(); extern void plrctrls_after_game_logic();