Browse Source

Adjust cursor position only when a action should be repeated (for example locking to a target).

pull/2969/head
obligaron 5 years ago committed by Anders Jenbo
parent
commit
ada3b3daba
  1. 2
      Source/cursor.cpp

2
Source/cursor.cpp

@ -330,7 +330,7 @@ void CheckCursMove()
my = clamp(my, 0, MAXDUNY - 1);
// While holding the button down we should retain target (but potentially lose it if it dies, goes out of view, etc)
if (sgbMouseDown != CLICK_NONE && pcursinvitem == -1 && IsNoneOf(LastMouseButtonAction, MouseActionType::Attack, MouseActionType::Spell)) {
if (sgbMouseDown != CLICK_NONE && IsNoneOf(LastMouseButtonAction, MouseActionType::None, MouseActionType::Attack, MouseActionType::Spell)) {
if (pcursmonst != -1) {
if (Monsters[pcursmonst]._mDelFlag || Monsters[pcursmonst]._mhitpoints >> 6 <= 0
|| ((dFlags[Monsters[pcursmonst].position.tile.x][Monsters[pcursmonst].position.tile.y] & BFLAG_VISIBLE) == 0))

Loading…
Cancel
Save