This commit is contained in:
JohnCorby 2022-01-18 15:02:48 -08:00
parent 10108ff871
commit 47b98f2a1c
2 changed files with 9 additions and 5 deletions

View File

@ -12,20 +12,19 @@ namespace QSB.Utility
public sealed override bool OnSerialize(NetworkWriter writer, bool initialState)
{
var changed = base.OnSerialize(writer, initialState);
if (initialState && isServer)
if (initialState)
{
Serialize(writer, true);
UpdatePrevData();
return true;
}
return changed;
return false;
}
public sealed override void OnDeserialize(NetworkReader reader, bool initialState)
{
base.OnDeserialize(reader, initialState);
if (initialState && !isServer)
if (initialState)
{
UpdatePrevData();
Deserialize(reader, true);

View File

@ -78,6 +78,11 @@ namespace QSB.WorldSync
public static void RemoveWorldObjects()
{
if (!AllObjectsReady)
{
return;
}
GameReset();
AllObjectsAdded = false;