- added some missing End... calls in player deserialization code.
- fixed reading of music name. In its current state the code is now capable of reading an E1M1 savegame and continuing play.
This commit is contained in:
parent
d28d02839e
commit
e4924c3d47
5 changed files with 13 additions and 224 deletions
|
|
@ -523,14 +523,14 @@ void P_SerializeSounds(FSerializer &arc)
|
|||
{
|
||||
S_SerializeSounds(arc);
|
||||
DSeqNode::SerializeSequences (arc);
|
||||
char *name = NULL;
|
||||
const char *name = NULL;
|
||||
BYTE order;
|
||||
|
||||
if (arc.isWriting())
|
||||
{
|
||||
order = S_GetMusic(&name);
|
||||
order = S_GetMusic((char **)&name);
|
||||
}
|
||||
arc("musicname", name)
|
||||
arc.StringPtr("musicname", name)
|
||||
("musicorder", order);
|
||||
|
||||
if (arc.isReading())
|
||||
|
|
@ -612,6 +612,7 @@ void P_SerializePlayers(FSerializer &arc, bool skipload)
|
|||
{
|
||||
ReadMultiplePlayers(arc, numPlayers, numPlayersNow, skipload);
|
||||
}
|
||||
arc.EndArray();
|
||||
}
|
||||
if (!skipload && numPlayersNow > numPlayers)
|
||||
{
|
||||
|
|
@ -662,6 +663,7 @@ static void ReadOnePlayer(FSerializer &arc, bool skipload)
|
|||
}
|
||||
}
|
||||
}
|
||||
arc.EndObject();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -687,6 +689,7 @@ static void ReadMultiplePlayers(FSerializer &arc, int numPlayers, int numPlayers
|
|||
{
|
||||
arc.StringPtr("playername", nametemp[i]);
|
||||
playertemp[i].Serialize(arc);
|
||||
arc.EndObject();
|
||||
}
|
||||
tempPlayerUsed[i] = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue