fix(core): Fixes issues with deserialization due to bad checking of dirty tracking (#618)
Fixes a major issue where serialization was not respecting the dirty tracking feature flag.
This commit is contained in:
parent
3c6356e8fa
commit
1f499b00c6
8 changed files with 16 additions and 7 deletions
|
|
@ -39,6 +39,14 @@ namespace Server
|
|||
public void InitializeSaveBuffer(byte[] buffer)
|
||||
{
|
||||
SaveBuffer = new BufferWriter(buffer, true);
|
||||
if (World.DirtyTrackingEnabled)
|
||||
{
|
||||
SavePosition = SaveBuffer.Position;
|
||||
}
|
||||
else
|
||||
{
|
||||
SavePosition = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public void Serialize()
|
||||
|
|
@ -59,6 +67,10 @@ namespace Server
|
|||
{
|
||||
SavePosition = SaveBuffer.Position;
|
||||
}
|
||||
else
|
||||
{
|
||||
SavePosition = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue