mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- Fixed: When loading FBehavior::SerializeVarSet() would only zero the variables if there were
non-zero variables to load. This was fine when all variables defaulted to zero, but map variables have been able to default to something else for some time now. This meant that if all map variables were zero when the game was saved, they would be restored to their default values when the game was loaded. SVN r3190 (trunk)
This commit is contained in:
parent
65977c2d0c
commit
e36dc34d8f
1 changed files with 2 additions and 2 deletions
|
@ -936,6 +936,8 @@ void FBehavior::SerializeVarSet (FArchive &arc, SDWORD *vars, int max)
|
||||||
{
|
{
|
||||||
SDWORD truelast;
|
SDWORD truelast;
|
||||||
|
|
||||||
|
memset (vars, 0, max*sizeof(*vars));
|
||||||
|
|
||||||
arc << last;
|
arc << last;
|
||||||
if (last == 0)
|
if (last == 0)
|
||||||
{
|
{
|
||||||
|
@ -950,8 +952,6 @@ void FBehavior::SerializeVarSet (FArchive &arc, SDWORD *vars, int max)
|
||||||
last = max;
|
last = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (vars, 0, max*sizeof(*vars));
|
|
||||||
|
|
||||||
while (first < last)
|
while (first < last)
|
||||||
{
|
{
|
||||||
arc << vars[first];
|
arc << vars[first];
|
||||||
|
|
Loading…
Reference in a new issue