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. // Open chests, doors, pickup items.
void PerformSecondaryAction(); void PerformSecondaryAction();
void UpdateSpellTarget(spell_id spell);
bool TryDropItem(); bool TryDropItem();
void InvalidateInventorySlot(); void InvalidateInventorySlot();
void FocusOnInventory(); void FocusOnInventory();

5
Source/track.cpp

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

Loading…
Cancel
Save