Command repeating by using cmd queues
This replaces the old pushq/saveq arrays (which were used to save the keys pressed by the user for repeating a previous command) with a new command queue. This means there's no hard-coded limit to the saved keys, and it can repeat extended commands which are not bound to any key.
This commit is contained in:
@@ -969,8 +969,8 @@ use_pick_axe(struct obj *obj)
|
||||
if (obj != uwep) {
|
||||
if (wield_tool(obj, "swing")) {
|
||||
/* we're now wielding it. next turn, apply to dig. */
|
||||
cmdq_add_ec(doapply);
|
||||
cmdq_add_key(obj->invlet);
|
||||
cmdq_add_ec(CQ_CANNED, doapply);
|
||||
cmdq_add_key(CQ_CANNED, obj->invlet);
|
||||
return ECMD_TIME;
|
||||
}
|
||||
return ECMD_OK;
|
||||
|
||||
Reference in New Issue
Block a user