Fixes bugs in world save (#297)

- [X] Fixes bugs in the buffer writer
- [X] Removes background save commands
- [X] Avoids calling Serialize() on deserialization
    - In a future optimization I will copy the entire object to a buffer, deserialize using a SpanReader, then use that buffer for the SaveBuffer
- [X] Fixes issue with decay queue.

Bumps release version
This commit is contained in:
Kamron Batman 2020-11-01 17:22:18 -08:00 committed by GitHub
parent daf48ebdf2
commit 55935d30b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 122 additions and 153 deletions

View file

@ -38,10 +38,10 @@ namespace Server.Guilds
public int TypeRef => 0;
public void Serialize(DateTime serializeStart)
public void Serialize()
{
SaveBuffer ??= new BufferWriter(true);
SaveBuffer.Flush();
SaveBuffer.Reset();
Serialize(SaveBuffer);
}