disable toggles and menu shortcuts when typing on chat (#770)

Fixes #767, thanks @MrAlaux
This commit is contained in:
Fabian Greffrath 2022-10-18 21:42:44 +02:00 committed by GitHub
parent a127a4a455
commit d24962241e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5282,7 +5282,7 @@ boolean M_Responder (event_t* ev)
// If there is no active menu displayed... // If there is no active menu displayed...
if (!menuactive) // phares if (!menuactive && !chat_on) // phares
{ // | { // |
if (M_InputActivated(input_autorun)) // Autorun // V if (M_InputActivated(input_autorun)) // Autorun // V
{ {
@ -5404,7 +5404,7 @@ boolean M_Responder (event_t* ev)
if (M_InputActivated(input_zoomout)) // zoom out if (M_InputActivated(input_zoomout)) // zoom out
{ {
if (automapactive || chat_on) if (automapactive)
return false; return false;
M_SizeDisplay(0); M_SizeDisplay(0);
S_StartSound(NULL,sfx_stnmov); S_StartSound(NULL,sfx_stnmov);
@ -5413,7 +5413,7 @@ boolean M_Responder (event_t* ev)
if (M_InputActivated(input_zoomin)) // zoom in if (M_InputActivated(input_zoomin)) // zoom in
{ // jff 2/23/98 { // jff 2/23/98
if (automapactive || chat_on) // allow if (automapactive) // allow
return false; // key_hud==key_zoomin return false; // key_hud==key_zoomin
M_SizeDisplay(1); // ^ M_SizeDisplay(1); // ^
S_StartSound(NULL,sfx_stnmov); // | S_StartSound(NULL,sfx_stnmov); // |
@ -5422,7 +5422,7 @@ boolean M_Responder (event_t* ev)
if (M_InputActivated(input_hud)) // heads-up mode if (M_InputActivated(input_hud)) // heads-up mode
{ {
if ((automapactive && !automapoverlay) || chat_on) // jff 2/22/98 if (automapactive && !automapoverlay) // jff 2/22/98
return false; // HUD mode control return false; // HUD mode control
if (screenSize<8) // function on default F5 if (screenSize<8) // function on default F5
while (screenSize<8 || !hud_displayed) // make hud visible while (screenSize<8 || !hud_displayed) // make hud visible