Fix fire auto-swapweaponing to polearm
When you have a polearm as secondary weapon, have a fireassist on, and press 'f' to fire, the code tries to swapweapon to the polearm. This failed badly and got stuck in a loop if you were also wearing a shield - as polearms are two-handed and shield prevents wielding those. Add a new "command failed" result, and clear the command queue in that case. Also make swapweapon and wield actually return the ECMD flags back to the rhack loop.
This commit is contained in:
@@ -3976,9 +3976,9 @@ rhack(char *cmd)
|
||||
prefix_seen = 0;
|
||||
was_m_prefix = FALSE;
|
||||
}
|
||||
if ((res & ECMD_CANCEL)) {
|
||||
if ((res & (ECMD_CANCEL|ECMD_FAIL))) {
|
||||
/* command was canceled by user, maybe they declined to
|
||||
pick an object to act on. */
|
||||
pick an object to act on, or command failed to finish */
|
||||
reset_cmd_vars(TRUE);
|
||||
prefix_seen = 0;
|
||||
cmdq_ec = NULL;
|
||||
|
||||
Reference in New Issue
Block a user