This commit is contained in:
TehRealSalt 2018-02-08 18:14:56 -05:00
parent 496eac9705
commit 80ba8792bd
5 changed files with 21 additions and 10 deletions

View file

@ -3518,7 +3518,7 @@ static void HandleConnect(SINT8 node)
#ifdef JOININGAME #ifdef JOININGAME
if (nodewaiting[node]) 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 SV_SendSaveGame(node); // send a complete game state
DEBFILE("send savegame\n"); 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? /// \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? /// Shouldn't them be downloaded even at intermission time?
/// Also, according to HandleConnect, the server will send the savegame even during intermission... /// Also, according to HandleConnect, the server will send the savegame even during intermission...
if (netbuffer->u.servercfg.gamestate == GS_LEVEL/* || if (netbuffer->u.servercfg.gamestate == GS_LEVEL
netbuffer->u.servercfg.gamestate == GS_INTERMISSION*/) /*|| netbuffer->u.servercfg.gamestate == GS_INTERMISSION
|| netbuffer->u.servercfg.gamestate == GS_VOTING*/)
cl_mode = CL_DOWNLOADSAVEGAME; cl_mode = CL_DOWNLOADSAVEGAME;
else else
#endif #endif

View file

@ -1994,7 +1994,7 @@ void D_PickVote(void)
} }
} }
key = P_RandomKey(numvotes); key = M_RandomKey(numvotes);
buf[0] = temppicks[key]; buf[0] = temppicks[key];
buf[1] = templevels[key]; buf[1] = templevels[key];

View file

@ -3170,7 +3170,7 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean ignorebuffer)
} }
else else
{ {
ix = okmaps[P_RandomKey(numokmaps)]; ix = okmaps[M_RandomKey(numokmaps)];
for (bufx = NUMMAPS-4; bufx > 0; bufx--) for (bufx = NUMMAPS-4; bufx > 0; bufx--)
randmapbuffer[bufx] = randmapbuffer[bufx-1]; randmapbuffer[bufx] = randmapbuffer[bufx-1];
randmapbuffer[0] = ix; randmapbuffer[0] = ix;
@ -3354,7 +3354,7 @@ void G_AfterIntermission(void)
// //
void G_NextLevel(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)) && !modeattacking && !skipstats && (multiplayer || netgame))
gameaction = ga_startvote; gameaction = ga_startvote;
else else

View file

@ -159,7 +159,7 @@ void COM_Lua_f(void)
return; 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 lua_rawgeti(gL, -1, 1); // push function from command info table
I_Assert(lua_isfunction(gL, -1)); I_Assert(lua_isfunction(gL, -1));
lua_remove(gL, -2); // pop command info table lua_remove(gL, -2); // pop command info table

View file

@ -3349,10 +3349,20 @@ static void M_DrawPauseMenu(void)
// Draw any and all emblems at the top. // Draw any and all emblems at the top.
M_DrawMapEmblems(gamemap, 272, 28); M_DrawMapEmblems(gamemap, 272, 28);
if (mapheaderinfo[gamemap-1]->actnum != 0) if (mapheaderinfo[gamemap-1]->zonttl)
V_DrawString(40, 28, V_YELLOWMAP, va("%s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum)); {
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 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. // Set up the detail boxes.
{ {