- fixed: object pointers as array members may not be skipped if they are null.
- changed S_GetMusic to return a const pointer to the actual music name instead of a copy. The only thing this is used for is the savegame code and it has no use for a copy, it can work far more efficiently with a const pointer.
This commit is contained in:
parent
02b3884dff
commit
36bf099d54
4 changed files with 31 additions and 18 deletions
|
|
@ -528,7 +528,7 @@ void P_SerializeSounds(FSerializer &arc)
|
|||
|
||||
if (arc.isWriting())
|
||||
{
|
||||
order = S_GetMusic((char **)&name);
|
||||
order = S_GetMusic(&name);
|
||||
}
|
||||
arc.StringPtr("musicname", name)
|
||||
("musicorder", order);
|
||||
|
|
@ -539,7 +539,6 @@ void P_SerializeSounds(FSerializer &arc)
|
|||
if (level.cdtrack == 0 || !S_ChangeCDMusic(level.cdtrack, level.cdid))
|
||||
S_ChangeMusic(level.Music, level.musicorder);
|
||||
}
|
||||
delete[] name;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue