Browse Source

Fix bad interaction between hold to attack and quick cast (#4965)

pull/5105/head
Nicholas Calaway 4 years ago committed by Anders Jenbo
parent
commit
ab3eb84581
  1. 8
      Source/controls/plrctrls.cpp

8
Source/controls/plrctrls.cpp

@ -2030,6 +2030,7 @@ void PerformSecondaryAction()
void QuickCast(int slot) void QuickCast(int slot)
{ {
MouseActionType prevMouseButtonAction = LastMouseButtonAction;
auto &myPlayer = Players[MyPlayerId]; auto &myPlayer = Players[MyPlayerId];
spell_id spell = myPlayer._pSplHotKey[slot]; spell_id spell = myPlayer._pSplHotKey[slot];
spell_type spellType = myPlayer._pSplTHotKey[slot]; spell_type spellType = myPlayer._pSplTHotKey[slot];
@ -2039,12 +2040,7 @@ void QuickCast(int slot)
} }
CheckPlrSpell(false, spell, spellType); CheckPlrSpell(false, spell, spellType);
if (pcursplr != -1) LastMouseButtonAction = prevMouseButtonAction;
LastMouseButtonAction = MouseActionType::SpellPlayerTarget;
else if (pcursmonst != -1)
LastMouseButtonAction = MouseActionType::SpellMonsterTarget;
else
LastMouseButtonAction = MouseActionType::Spell;
} }
} // namespace devilution } // namespace devilution

Loading…
Cancel
Save