From a0fa2dda5711db197125b3fc006bcdab602ab60e Mon Sep 17 00:00:00 2001 From: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Date: Sat, 5 Apr 2025 16:51:13 +0200 Subject: [PATCH] Stub new undocumented 516 m4/m5 (#90404) ## About The Pull Request Lummox added these and didnt document them so these are leftclicking rn ## Changelog :cl: fix: Mouse4 and Mouse5 no longer leftclick /:cl: Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com> --- code/__DEFINES/_click.dm | 2 ++ code/_onclick/click.dm | 3 +++ 2 files changed, 5 insertions(+) diff --git a/code/__DEFINES/_click.dm b/code/__DEFINES/_click.dm index 07d044f8b89..08507a4dff9 100644 --- a/code/__DEFINES/_click.dm +++ b/code/__DEFINES/_click.dm @@ -5,6 +5,8 @@ #define RIGHT_CLICK "right" #define MIDDLE_CLICK "middle" #define LEFT_CLICK "left" +#define BUTTON4 "xbutton1" +#define BUTTON5 "xbutton2" ///Mouse button that was just clicked/released ///if(modifiers[BUTTON] == LEFT_CLICK) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 0981c6f2518..1b015ea2efd 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -76,6 +76,9 @@ if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, modifiers) & COMSIG_MOB_CANCEL_CLICKON) return + if(LAZYACCESS(modifiers, BUTTON4) || LAZYACCESS(modifiers, BUTTON5)) + return + if(LAZYACCESS(modifiers, SHIFT_CLICK)) if(LAZYACCESS(modifiers, MIDDLE_CLICK)) ShiftMiddleClickOn(A)