From 0f038f9a3bb2dfa880061d60a2a04e6b9e89c7d1 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 1 Sep 2015 12:45:26 +0100 Subject: [PATCH 1/3] Add M_Options(0); to F4/F5/F7 code to prevent them going to Main Menu instead of SP/MP pause menus when the latter should be shown --- src/m_menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 06aaac0ef..c7a9fcc16 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2203,6 +2203,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); + M_Options(0); currentMenu = &OP_SoundOptionsDef; itemOn = 0; return true; @@ -2212,6 +2213,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); + M_Options(0); M_VideoModeMenu(0); return true; #endif @@ -2223,6 +2225,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); + M_Options(0); M_SetupNextMenu(&OP_MainDef); return true; From 775ccde424f57d533a93ac44db6a7905a18c16f8 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 1 Sep 2015 12:45:26 +0100 Subject: [PATCH 2/3] Add M_Options(0); to F4/F5/F7 code to prevent them going to Main Menu instead of SP/MP pause menus when the latter should be shown --- src/m_menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 06aaac0ef..c7a9fcc16 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2203,6 +2203,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); + M_Options(0); currentMenu = &OP_SoundOptionsDef; itemOn = 0; return true; @@ -2212,6 +2213,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); + M_Options(0); M_VideoModeMenu(0); return true; #endif @@ -2223,6 +2225,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); + M_Options(0); M_SetupNextMenu(&OP_MainDef); return true; From 52e2087ee7e2a068195e58d6b27828f06c9a7b5e Mon Sep 17 00:00:00 2001 From: Yukita Mayako Date: Thu, 3 Sep 2015 13:13:55 -0400 Subject: [PATCH 3/3] Fixed NetVars hook mistakenly assuming index starts from 0. --- src/lua_script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua_script.c b/src/lua_script.c index 8b40d9f00..0634c96ab 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -743,7 +743,7 @@ static int NetArchive(lua_State *L) { int TABLESINDEX = lua_upvalueindex(1); int i, n = lua_gettop(L); - for (i = 0; i < n; i++) + for (i = 1; i <= n; i++) ArchiveValue(TABLESINDEX, i); return n; } @@ -893,7 +893,7 @@ static int NetUnArchive(lua_State *L) { int TABLESINDEX = lua_upvalueindex(1); int i, n = lua_gettop(L); - for (i = 0; i < n; i++) + for (i = 1; i <= n; i++) UnArchiveValue(TABLESINDEX); return n; }