diff --git a/src/g_game.c b/src/g_game.c index 4262c2a3a..a3305157e 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1937,6 +1937,11 @@ boolean G_Responder(event_t *ev) COM_ImmedExecute("changeteam4 spectator"); } } + if (ev->data1 == gamecontrol[gc_director][0] + || ev->data1 == gamecontrol[gc_director][1]) + { + COM_ImmedExecute("add director 1"); + } return true; diff --git a/src/g_input.c b/src/g_input.c index b6e631309..536ea0c83 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -812,6 +812,7 @@ static const char *gamecontrolname[num_gamecontrols] = "custom1", "custom2", "custom3", + "director", }; #define NUMKEYNAMES (sizeof (keynames)/sizeof (keyname_t)) diff --git a/src/g_input.h b/src/g_input.h index dac8a3e23..635e1f64b 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -98,6 +98,7 @@ typedef enum gc_custom1, // Lua scriptable gc_custom2, // Lua scriptable gc_custom3, // Lua scriptable + gc_director, num_gamecontrols } gamecontrols_e; diff --git a/src/m_menu.c b/src/m_menu.c index 4f3b15559..0f32ba85e 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1198,6 +1198,7 @@ static menuitem_t OP_AllControlsMenu[] = {IT_CONTROL, NULL, "Look Up", M_ChangeControl, gc_lookup }, {IT_CONTROL, NULL, "Look Down", M_ChangeControl, gc_lookdown }, {IT_CONTROL, NULL, "Center View", M_ChangeControl, gc_centerview }, + {IT_CONTROL, NULL, "Toggle Director", M_ChangeControl, gc_director }, {IT_HEADER, NULL, "Custom Lua Actions", NULL, 0}, {IT_SPACE, NULL, NULL, NULL, 0}, {IT_CONTROL, NULL, "Custom Action 1", M_ChangeControl, gc_custom1 },