- 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:
Randy Heit 2011-04-24 17:16:13 +00:00
parent 65977c2d0c
commit e36dc34d8f

View file

@ -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];