Prevent getpos queueing mouse commands

My change to allow binding the mouse buttons made getpos
push the mouse commands into a command queue, so when you
were asked for a map location, clicked on it with a mouse,
you'd first get the expected effect, and then (most likely)
immediately traveled there.

Change getpos to clear the commands bound to the mouse buttons,
and restore the binds afterwards.
This commit is contained in:
Pasi Kallinen
2022-08-24 14:21:24 +03:00
parent 282b2a7bbe
commit 7c8ccb8ccd
3 changed files with 24 additions and 1 deletions

View File

@@ -273,6 +273,7 @@ extern int extcmds_match(const char *, int, int **);
extern const char *key2extcmddesc(uchar);
extern boolean bind_specialkey(uchar, const char *);
extern void parseautocomplete(char *, boolean);
extern void lock_mouse_buttons(boolean);
extern void reset_commands(boolean);
extern void update_rest_on_space(void);
extern void rhack(char *);