diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 06592852a..3d864e392 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3518,7 +3518,7 @@ static void HandleConnect(SINT8 node) #ifdef JOININGAME if (nodewaiting[node]) { - if ((gamestate == GS_LEVEL || gamestate == GS_INTERMISSION) && newnode) + if ((gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING) && newnode) { SV_SendSaveGame(node); // send a complete game state DEBFILE("send savegame\n"); @@ -3730,8 +3730,9 @@ static void HandlePacketFromAwayNode(SINT8 node) /// \note Wait. What if a Lua script uses some global custom variables synched with the NetVars hook? /// Shouldn't them be downloaded even at intermission time? /// Also, according to HandleConnect, the server will send the savegame even during intermission... - if (netbuffer->u.servercfg.gamestate == GS_LEVEL/* || - netbuffer->u.servercfg.gamestate == GS_INTERMISSION*/) + if (netbuffer->u.servercfg.gamestate == GS_LEVEL + /*|| netbuffer->u.servercfg.gamestate == GS_INTERMISSION + || netbuffer->u.servercfg.gamestate == GS_VOTING*/) cl_mode = CL_DOWNLOADSAVEGAME; else #endif diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 5dc0a1809..cb212ede0 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1994,7 +1994,7 @@ void D_PickVote(void) } } - key = P_RandomKey(numvotes); + key = M_RandomKey(numvotes); buf[0] = temppicks[key]; buf[1] = templevels[key]; diff --git a/src/g_game.c b/src/g_game.c index 64188e599..adc67a1ba 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3170,7 +3170,7 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean ignorebuffer) } else { - ix = okmaps[P_RandomKey(numokmaps)]; + ix = okmaps[M_RandomKey(numokmaps)]; for (bufx = NUMMAPS-4; bufx > 0; bufx--) randmapbuffer[bufx] = randmapbuffer[bufx-1]; randmapbuffer[0] = ix; @@ -3354,7 +3354,7 @@ void G_AfterIntermission(void) // void G_NextLevel(void) { - if (cv_advancemap.value == 3 && gamestate != GS_VOTING + if ((cv_advancemap.value == 3 && gamestate != GS_VOTING) && !modeattacking && !skipstats && (multiplayer || netgame)) gameaction = ga_startvote; else diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index b9ae76b0a..d27d6fb03 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -159,7 +159,7 @@ void COM_Lua_f(void) return; } - // Do the command locally, NetXCmds don't go through outside of GS_LEVEL || GS_INTERMISSION + // Do the command locally, NetXCmds don't go through outside of GS_LEVEL || GS_INTERMISSION || GS_VOTING lua_rawgeti(gL, -1, 1); // push function from command info table I_Assert(lua_isfunction(gL, -1)); lua_remove(gL, -2); // pop command info table diff --git a/src/m_menu.c b/src/m_menu.c index d048ade46..0553b984e 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3349,10 +3349,20 @@ static void M_DrawPauseMenu(void) // Draw any and all emblems at the top. M_DrawMapEmblems(gamemap, 272, 28); - if (mapheaderinfo[gamemap-1]->actnum != 0) - V_DrawString(40, 28, V_YELLOWMAP, va("%s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum)); + if (mapheaderinfo[gamemap-1]->zonttl) + { + if (mapheaderinfo[gamemap-1]->actnum != 0) + V_DrawString(40, 28, V_YELLOWMAP, va("%s %s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum)); + else + V_DrawString(40, 28, V_YELLOWMAP, va("%s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl)); + } else - V_DrawString(40, 28, V_YELLOWMAP, mapheaderinfo[gamemap-1]->lvlttl); + { + if (mapheaderinfo[gamemap-1]->actnum != 0) + V_DrawString(40, 28, V_YELLOWMAP, va("%s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum)); + else + V_DrawString(40, 28, V_YELLOWMAP, mapheaderinfo[gamemap-1]->lvlttl); + } // Set up the detail boxes. {