mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Allow old version savegames to "load" by just starting a new game on the volume, level and skill written in the savegame header.
git-svn-id: https://svn.eduke32.com/eduke32@4596 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
cd713abf1e
commit
0d68e1d4a9
1 changed files with 15 additions and 9 deletions
|
@ -242,7 +242,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
ready2send = 0;
|
||||
|
||||
i = sv_loadheader(fil, spot, &h);
|
||||
if (i || h.numplayers!=ud.multimode)
|
||||
if (i && i != 2 || h.numplayers!=ud.multimode)
|
||||
{
|
||||
if (i == 2 || i == 3)
|
||||
P_DoQuote(QUOTE_SAVE_BAD_VERSION, g_player[myconnectindex].ps);
|
||||
|
@ -306,6 +306,12 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
|
||||
Bmemcpy(currentboardfilename, boardfilename, BMAX_PATH);
|
||||
|
||||
if (i == 2)
|
||||
{
|
||||
G_NewGame_EnterLevel();
|
||||
}
|
||||
else
|
||||
{
|
||||
// read the rest...
|
||||
i = sv_loadsnapshot(fil, spot, &h);
|
||||
if (i)
|
||||
|
@ -315,7 +321,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
Bsprintf(tempbuf, "Loading save game file \"%s\" failed (code %d), cannot recover.", fn, i);
|
||||
G_GameExit(tempbuf);
|
||||
}
|
||||
|
||||
}
|
||||
sv_postudload(); // ud.m_XXX = ud.XXX
|
||||
|
||||
VM_OnEvent(EVENT_LOADGAME, g_player[myconnectindex].ps->i, myconnectindex, -1, 0);
|
||||
|
|
Loading…
Reference in a new issue