- 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.
This commit is contained in:
Christoph Oelckers 2023-09-15 22:00:05 +02:00
parent 7f7edc4f72
commit b082c50502
1 changed files with 1 additions and 1 deletions

View File

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