another getobj/force_invmenu fix
For !force_invmenu when attempting a command that needs an object, if inventory is completely empty What do you want to <foo>? [*] will report "Never mind" and stop asking if player presses return or report "Not carrying anything" and reprompt if player types '*'. But for force_invmenu, it would report Not carrying anything. Never mind. without any reprompting in between the two messages. Just skip the second message in that situation. Perhaps the first case should avoid reprompting too but I haven't gone that far.
This commit is contained in:
@@ -1632,8 +1632,11 @@ getobj(const char *word,
|
||||
ilet = display_pickinv(allowed_choices, *qbuf ? qbuf : (char *) 0,
|
||||
menuquery,
|
||||
TRUE, allowcnt ? &ctmp : (long *) 0);
|
||||
if (!ilet)
|
||||
if (!ilet) {
|
||||
if (oneloop)
|
||||
return (struct obj *) 0;
|
||||
continue;
|
||||
}
|
||||
if (ilet == HANDS_SYM)
|
||||
return (struct obj *) &cg.zeroobj; /* cast away 'const' */
|
||||
if (ilet == '\033') {
|
||||
|
||||
Reference in New Issue
Block a user