From e12d5df3b414fe512464bf9d0d773e0fc33f6bda Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 4 Nov 2026 14:57:01 +0000 Subject: [PATCH] Decompile fn_04726 (CMouse::Update) Batch #10598 by dori: 0 byte-identical, 1 confirmed by peer review. - fn_04726 CMouse::Update: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Toshiro, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Input/Mouse.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Client/Input/Mouse.cpp b/Source/Client/Input/Mouse.cpp index 506cfdec..4af89011 100644 --- a/Source/Client/Input/Mouse.cpp +++ b/Source/Client/Input/Mouse.cpp @@ -27,18 +27,18 @@ void CMouse::Update() { this->pressTicks[index] = now - this->doubleClickTime; } - if (this->pendingButtons[index]) { - if (this->previousButtons[index]) { - this->buttons[index] = 2; - } else if (now >= this->pressTicks[index] + this->doubleClickTime) { - this->pressTicks[index] = now; - this->buttons[index] = 1; - } else { + if (!this->pendingButtons[index]) { + this->buttons[index] = this->previousButtons[index] ? 3 : 0; + } else if (!this->previousButtons[index]) { + if (now < this->pressTicks[index] + this->doubleClickTime) { this->buttons[index] = 4; this->pressTicks[index] = now - this->doubleClickTime; + } else { + this->pressTicks[index] = now; + this->buttons[index] = 1; } } else { - this->buttons[index] = this->previousButtons[index] ? 3 : 0; + this->buttons[index] = 2; } }