Browse Source

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 <noreply@anthropic.com>
pull/8474/head
hidwood 2 months ago
parent
commit
e55ce90814
  1. 6
      Source/controls/accessibility_keys.cpp
  2. 2
      Source/controls/town_npc_nav.cpp
  3. 2
      Source/diablo.cpp

6
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 });
}

2
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<int>(MaxPathLengthPlayer)) {
const int townerIdx = AutoWalkTownNpcTarget;

2
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();

Loading…
Cancel
Save