Skip to content

Commit

Permalink
Merge pull request #259 from FreeZoneMods/saveload-bug
Browse files Browse the repository at this point in the history
Fix corrupted game saves
  • Loading branch information
Xottab-DUTY authored Oct 21, 2018
2 parents 02891e5 + 9197481 commit 8a4962c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xrGame/alife_registry_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ struct RegistryHelper<TContainer, Loki::Typelist<Head, Tail>>

static void Save(TContainer* self, IWriter& writer)
{
RegistryHelper<TContainer, Tail>::Save(self, writer);
if constexpr (isSerializable)
self->Head::save(writer);
RegistryHelper<TContainer, Tail>::Save(self, writer);
};

static void Load(TContainer* self, IReader& reader)
{
RegistryHelper<TContainer, Tail>::Load(self, reader);
if constexpr (isSerializable)
self->Head::load(reader);
RegistryHelper<TContainer, Tail>::Load(self, reader);
}
};

Expand Down

0 comments on commit 8a4962c

Please sign in to comment.