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.
This commit is contained in:
PatR
2022-06-13 14:44:20 -07:00
parent 193d0c4332
commit 145232a16f

View File

@@ -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);