B08020 - partial fix for D<count>$ behavior

When GOLDOBJ is defined, dropping partial amounts of gold using the D
command would not work because gold currently has the same inventory letter
as the coin group accelerator.  In this case, the group accelerator should
not be used, since it confuses counts.  tty and X11 ports are fixed.  The
tty change should fix the Windows console version as well (untested).
This commit is contained in:
cohrs
2002-08-21 16:57:21 +00:00
parent d18027e570
commit a78e08d0c5
2 changed files with 8 additions and 2 deletions

View File

@@ -713,7 +713,10 @@ X11_select_menu(window, how, menu_list)
for (i = 0; i < SIZE(gcnt); i++) gcnt[i] = 0;
for (n = 0, curr = menu_info->new_menu.base; curr; curr = curr->next)
if (curr->gselector) ++n, ++gcnt[GSELIDX(curr->gselector)];
if (curr->gselector && curr->gselector != curr->selector) {
++n;
++gcnt[GSELIDX(curr->gselector)];
}
if (n > 0) /* at least one group accelerator found */
for (ap = gacc, curr = menu_info->new_menu.base;

View File

@@ -1156,7 +1156,10 @@ struct WinDesc *cw;
for (i = 0; i < SIZE(gcnt); i++) gcnt[i] = 0;
for (n = 0, curr = cw->mlist; curr; curr = curr->next)
if (curr->gselector) ++n, ++gcnt[GSELIDX(curr->gselector)];
if (curr->gselector && curr->gselector != curr->selector) {
++n;
++gcnt[GSELIDX(curr->gselector)];
}
if (n > 0) /* at least one group accelerator found */
for (rp = gacc, curr = cw->mlist; curr; curr = curr->next)