fix: Adds AfterSerialize support. Removes BeforeSerialize support. (#1208)
### Changes * Implements an AfterSerialize method that is executed synchronously. * Removes `BeforeSerialize` support since it was dangerous in its current implementation. * Moves PlayerMobile kill/virtual decay to AfterSerialize. * Adds kill decay to after Deserialize.
This commit is contained in:
parent
deabab575a
commit
49e6c6f2d1
13 changed files with 132 additions and 61 deletions
|
|
@ -103,10 +103,6 @@ public class Entity : IEntity
|
|||
&& p.Y >= Location.m_Y - range
|
||||
&& p.Y <= Location.m_Y + range;
|
||||
|
||||
public void BeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Deserialize(IGenericReader reader)
|
||||
{
|
||||
// Should not actually be saved
|
||||
|
|
@ -116,4 +112,10 @@ public class Entity : IEntity
|
|||
public void Serialize(IGenericWriter writer)
|
||||
{
|
||||
}
|
||||
|
||||
public bool ShouldExecuteAfterSerialize => false;
|
||||
|
||||
public void AfterSerialize()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue