mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
tweak
This commit is contained in:
parent
10108ff871
commit
47b98f2a1c
@ -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);
|
||||
|
@ -78,6 +78,11 @@ namespace QSB.WorldSync
|
||||
|
||||
public static void RemoveWorldObjects()
|
||||
{
|
||||
if (!AllObjectsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GameReset();
|
||||
|
||||
AllObjectsAdded = false;
|
||||
|
Loading…
Reference in New Issue
Block a user