- 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
1 changed files with 2 additions and 2 deletions

View File

@ -936,6 +936,8 @@ void FBehavior::SerializeVarSet (FArchive &arc, SDWORD *vars, int max)
{
SDWORD truelast;
memset (vars, 0, max*sizeof(*vars));
arc << last;
if (last == 0)
{
@ -950,8 +952,6 @@ void FBehavior::SerializeVarSet (FArchive &arc, SDWORD *vars, int max)
last = max;
}
memset (vars, 0, max*sizeof(*vars));
while (first < last)
{
arc << vars[first];