From b082c5050261cc215b641269013cd5c6b841950f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 Sep 2023 22:00:05 +0200 Subject: [PATCH] - fixed doublebind check with automap. When no doublebinds get passed to C_DoKey it may not set the doubleclick flag. For the automap C_DoKey gets called twice, once with the automap bindings and once with the regular bindings and doubleclicks. --- src/common/console/c_bind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/console/c_bind.cpp b/src/common/console/c_bind.cpp index 90ceaedce..57499e68c 100644 --- a/src/common/console/c_bind.cpp +++ b/src/common/console/c_bind.cpp @@ -836,7 +836,7 @@ bool C_DoKey (event_t *ev, FKeyBindings *binds, FKeyBindings *doublebinds) if (ev->type == EV_KeyDown) { // Key pressed for a normal press binding = binds->GetBinding(ev->data1); - DClickTime[ev->data1] = nowtime + 571; + if (doublebinds != nullptr) DClickTime[ev->data1] = nowtime + 571; } else if (doublebinds != nullptr && DClicked[ev->data1]) { // Key released from a double click