From 8964913f569c9f1792c80e1185c6792eabb65316 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 16 May 2017 18:45:04 -0700 Subject: [PATCH] more movement prefix vs invalid direction If user enters Fz when 'cmdassist' is off, respond with "Invalid direction for 'F' prefix." instead of "Unknown command 'Fz'." --- src/cmd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index d354195bf..fc29aaf6b 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1494976933 2017/05/16 23:22:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.257 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1494985492 2017/05/17 01:44:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.258 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4445,10 +4445,13 @@ const char *msg; (sym == '<') ? "upward" : "downward"); } - /* if 'cmdassist', display via pline() and we're done (note: asking + /* if '!cmdassist', display via pline() and we're done (note: asking for help at getdir() prompt forces cmdassist for this operation) */ if (!viawindow) { - if (*buf) { + if (prefixhandling) { + if (!*buf) + Sprintf(buf, "Invalid direction for '%s' prefix.", + visctrl(Cmd.spkeys[spkey])); pline("%s", buf); return TRUE; } -- 2.40.0