Improve therecmdmenu

Turning on herecmd_menu and clicking with mouse is now actually
somewhat playable.
This commit is contained in:
Pasi Kallinen
2022-04-06 21:19:36 +03:00
parent b7d9bed8c5
commit eb9c7d77d4
4 changed files with 252 additions and 84 deletions

View File

@@ -1510,7 +1510,7 @@ getobj(const char *word,
struct _cmd_queue *cmdq = cmdq_pop();
if (cmdq) {
if (cmdq && cmdq->typ != CMDQ_USER_INPUT) {
/* it's not a key, abort */
if (cmdq->typ != CMDQ_KEY) {
free(cmdq);
@@ -1532,6 +1532,8 @@ getobj(const char *word,
cmdq_clear();
return (struct obj *)0;
}
if (cmdq)
free(cmdq);
/* is "hands"/"self" a valid thing to do this action on? */
switch ((*obj_ok)((struct obj *) 0)) {