Merge branch 'master' of https://git.magicalgirl.moe/KartKrew/Kart.git into sonicitems
This commit is contained in:
commit
5c5cbeeea2
|
@ -3539,7 +3539,7 @@ static void HandleConnect(SINT8 node)
|
||||||
#ifdef JOININGAME
|
#ifdef JOININGAME
|
||||||
if (nodewaiting[node])
|
if (nodewaiting[node])
|
||||||
{
|
{
|
||||||
if ((gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING) && newnode)
|
if (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");
|
||||||
|
@ -3752,11 +3752,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
|
/// Sryder 2018-07-05: If we don't want to send the player config another way we need to send the gamestate
|
||||||
/*|| netbuffer->u.servercfg.gamestate == GS_INTERMISSION
|
/// At almost any gamestate there could be joiners... So just always send gamestate?
|
||||||
|| netbuffer->u.servercfg.gamestate == GS_VOTING*/)
|
|
||||||
cl_mode = CL_DOWNLOADSAVEGAME;
|
cl_mode = CL_DOWNLOADSAVEGAME;
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
cl_mode = CL_CONNECTED;
|
cl_mode = CL_CONNECTED;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -962,6 +962,8 @@ void LUA_Archive(void)
|
||||||
ArchiveExtVars(&players[i], "player");
|
ArchiveExtVars(&players[i], "player");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gamestate == GS_LEVEL)
|
||||||
|
{
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||||
{
|
{
|
||||||
|
@ -969,6 +971,7 @@ void LUA_Archive(void)
|
||||||
// and write mobjnum in otherwise.
|
// and write mobjnum in otherwise.
|
||||||
ArchiveExtVars(th, "mobj");
|
ArchiveExtVars(th, "mobj");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
||||||
|
|
||||||
LUAh_NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
|
LUAh_NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
|
||||||
|
|
|
@ -3194,6 +3194,9 @@ static void P_NetArchiveMisc(void)
|
||||||
WRITEUINT32(save_p, ARCHIVEBLOCK_MISC);
|
WRITEUINT32(save_p, ARCHIVEBLOCK_MISC);
|
||||||
|
|
||||||
WRITEINT16(save_p, gamemap);
|
WRITEINT16(save_p, gamemap);
|
||||||
|
if (gamestate != GS_LEVEL)
|
||||||
|
WRITEINT16(save_p, GS_WAITINGPLAYERS); // nice hack to put people back into waitingplayers
|
||||||
|
else
|
||||||
WRITEINT16(save_p, gamestate);
|
WRITEINT16(save_p, gamestate);
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
|
Loading…
Reference in a new issue