Merge branch 'savedatareorder' into 'master'
Savedata load order of operations change See merge request STJr/SRB2Internal!583
This commit is contained in:
commit
f9460434f8
|
@ -2862,6 +2862,17 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
loadprecip = 0;
|
loadprecip = 0;
|
||||||
loademblems = 0;
|
loademblems = 0;
|
||||||
}
|
}
|
||||||
|
else if (savedata.lives > 0)
|
||||||
|
{
|
||||||
|
numgameovers = savedata.numgameovers;
|
||||||
|
players[consoleplayer].continues = savedata.continues;
|
||||||
|
players[consoleplayer].lives = savedata.lives;
|
||||||
|
players[consoleplayer].score = savedata.score;
|
||||||
|
if ((botingame = ((botskin = savedata.botskin) != 0)))
|
||||||
|
botcolor = skins[botskin-1].prefcolor;
|
||||||
|
emeralds = savedata.emeralds;
|
||||||
|
savedata.lives = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// internal game map
|
// internal game map
|
||||||
maplumpname = G_BuildMapName(gamemap);
|
maplumpname = G_BuildMapName(gamemap);
|
||||||
|
@ -3225,18 +3236,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
|
|
||||||
lastmaploaded = gamemap; // HAS to be set after saving!!
|
lastmaploaded = gamemap; // HAS to be set after saving!!
|
||||||
|
|
||||||
if (savedata.lives > 0)
|
|
||||||
{
|
|
||||||
numgameovers = savedata.numgameovers;
|
|
||||||
players[consoleplayer].continues = savedata.continues;
|
|
||||||
players[consoleplayer].lives = savedata.lives;
|
|
||||||
players[consoleplayer].score = savedata.score;
|
|
||||||
if ((botingame = ((botskin = savedata.botskin) != 0)))
|
|
||||||
botcolor = skins[botskin-1].prefcolor;
|
|
||||||
emeralds = savedata.emeralds;
|
|
||||||
savedata.lives = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (loadprecip) // uglier hack
|
if (loadprecip) // uglier hack
|
||||||
{ // to make a newly loaded level start on the second frame.
|
{ // to make a newly loaded level start on the second frame.
|
||||||
INT32 buf = gametic % BACKUPTICS;
|
INT32 buf = gametic % BACKUPTICS;
|
||||||
|
|
Loading…
Reference in a new issue