From acaaa50e80037033f853465421e517bb6a604897 Mon Sep 17 00:00:00 2001 From: danij Date: Sun, 25 Apr 2010 01:45:35 +0100 Subject: [PATCH] Fixed Common code library: The InFine script command 'notrigger' does not work, allowing the menu to be opened. --- doomsday/plugins/common/src/g_game.c | 10 +++++----- doomsday/plugins/common/src/hu_menu.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doomsday/plugins/common/src/g_game.c b/doomsday/plugins/common/src/g_game.c index 710185b900..f5c6000d2b 100644 --- a/doomsday/plugins/common/src/g_game.c +++ b/doomsday/plugins/common/src/g_game.c @@ -756,19 +756,19 @@ int G_UIResponder(event_t* ev) if(Hu_MsgResponder(ev)) return true; + if(ev->state != EVS_DOWN) + return false; + if(!(ev->type == EV_KEY || ev->type == EV_MOUSE_BUTTON || ev->type == EV_JOY_BUTTON)) + return false; + if(!Hu_MenuIsActive()) { // Any key/button down pops up menu if in demos. if(G_GetGameAction() == GA_NONE && !singledemo && (Get(DD_PLAYBACK) || FI_IsMenuTrigger(ev))) { - if(ev->state == EVS_DOWN && - (ev->type == EV_KEY || ev->type == EV_MOUSE_BUTTON || - ev->type == EV_JOY_BUTTON)) - { Hu_MenuCommand(MCMD_OPEN); return true; - } } } diff --git a/doomsday/plugins/common/src/hu_menu.c b/doomsday/plugins/common/src/hu_menu.c index a35234240e..cb9de00d40 100644 --- a/doomsday/plugins/common/src/hu_menu.c +++ b/doomsday/plugins/common/src/hu_menu.c @@ -1819,7 +1819,7 @@ void Hu_MenuCommand(menucommand_e cmd) if(!menuActive) { - if(cmd == MCMD_OPEN) + if(cmd == MCMD_OPEN && FI_IsMenuTrigger(NULL)) { S_LocalSound(SFX_MENU_OPEN, NULL);