Browse Source

[gamepad] Fix repeated spell casting getting stuck if there is no target

pull/4419/head
Anders Jenbo 4 years ago
parent
commit
c667e69554
  1. 1
      Source/controls/plrctrls.h
  2. 5
      Source/track.cpp

1
Source/controls/plrctrls.h

@ -72,6 +72,7 @@ void PerformPrimaryAction();
// Open chests, doors, pickup items.
void PerformSecondaryAction();
void UpdateSpellTarget(spell_id spell);
bool TryDropItem();
void InvalidateInventorySlot();
void FocusOnInventory();

5
Source/track.cpp

@ -97,7 +97,10 @@ void RepeatMouseAction()
NetSendCmdParam1(true, rangedAttack ? CMD_RATTACKPID : CMD_ATTACKPID, pcursplr);
break;
case MouseActionType::Spell:
CheckPlrSpell(true);
if (ControlMode != ControlTypes::KeyboardAndMouse) {
UpdateSpellTarget(MyPlayer->_pRSpell);
}
CheckPlrSpell(ControlMode == ControlTypes::KeyboardAndMouse);
break;
case MouseActionType::SpellMonsterTarget:
if (pcursmonst != -1)

Loading…
Cancel
Save