Browse Source

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

pull/4973/head
Nicholas Calaway 4 years ago committed by GitHub
parent
commit
67aaced610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Source/controls/plrctrls.cpp

8
Source/controls/plrctrls.cpp

@ -1991,6 +1991,7 @@ void PerformSecondaryAction()
void QuickCast(size_t slot)
{
MouseActionType prevMouseButtonAction = LastMouseButtonAction;
Player &myPlayer = *MyPlayer;
spell_id spell = myPlayer._pSplHotKey[slot];
spell_type spellType = myPlayer._pSplTHotKey[slot];
@ -2000,12 +2001,7 @@ void QuickCast(size_t slot)
}
CheckPlrSpell(false, spell, spellType);
if (pcursplr != -1)
LastMouseButtonAction = MouseActionType::SpellPlayerTarget;
else if (pcursmonst != -1)
LastMouseButtonAction = MouseActionType::SpellMonsterTarget;
else
LastMouseButtonAction = MouseActionType::Spell;
LastMouseButtonAction = prevMouseButtonAction;
}
} // namespace devilution

Loading…
Cancel
Save