play a sound if the menu is activated with a different key than ESC (#862)

* play a sound if the menu is activated with a different key than ESC

* fix ternary operator
This commit is contained in:
Fabian Greffrath 2023-01-04 11:14:34 +01:00 committed by GitHub
parent a45ee95d57
commit 5fa249c14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -951,6 +951,7 @@ boolean G_Responder(event_t* ev)
((ev->type == ev_keydown) ||
(ev->type == ev_mouseb_down) ||
(ev->type == ev_joyb_down)) ?
(!menuactive ? S_StartSound(NULL,sfx_swtchn) : true),
M_StartControlPanel(), true : false;
}