mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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,16 +306,22 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
|
||||
Bmemcpy(currentboardfilename, boardfilename, BMAX_PATH);
|
||||
|
||||
// read the rest...
|
||||
i = sv_loadsnapshot(fil, spot, &h);
|
||||
if (i)
|
||||
if (i == 2)
|
||||
{
|
||||
// in theory, we could load into an initial dump first and trivially
|
||||
// recover if things go wrong...
|
||||
Bsprintf(tempbuf, "Loading save game file \"%s\" failed (code %d), cannot recover.", fn, i);
|
||||
G_GameExit(tempbuf);
|
||||
G_NewGame_EnterLevel();
|
||||
}
|
||||
else
|
||||
{
|
||||
// read the rest...
|
||||
i = sv_loadsnapshot(fil, spot, &h);
|
||||
if (i)
|
||||
{
|
||||
// in theory, we could load into an initial dump first and trivially
|
||||
// recover if things go wrong...
|
||||
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