From: PatR Date: Mon, 13 Jun 2022 21:44:20 +0000 (-0700) Subject: fix 'simplify streamlined act_on_act()' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=145232a16fea0f9ec733d2f945f315999f3ee391;p=nethack fix 'simplify streamlined act_on_act()' Still more PR #777. Commit c4c6c3d73a broke #therecmdmenu travel, throw, and far-look. It was restricting dx and dy unnecessarily and that resulted in not specifying the correct location when the destination was farther than one step away. Testing those properly requires a mouse. I've implemented a way to simulate a left or right click at getdir()'s prompt (only useful for #therecmdmenu). That will be committed separately. --- diff --git a/src/cmd.c b/src/cmd.c index 75f312072..5a87efc3f 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 cmd.c $NHDT-Date: 1655145035 2022/06/13 18:30:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.574 $ */ +/* NetHack 3.7 cmd.c $NHDT-Date: 1655156619 2022/06/13 21:43:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.575 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -5093,7 +5093,8 @@ there_cmd_menu(int x, int y, int mod) char ch = '\0'; int npick = 0, K = 0; menu_item *picks = (menu_item *) 0; - int dx = sgn(x - u.ux), dy = sgn(y - u.uy); + /*int dx = sgn(x - u.ux), dy = sgn(y - u.uy);*/ + int dx = x - u.ux, dy = y - u.uy; int act = MCMD_NOTHING; win = create_nhwindow(NHW_MENU);