Removed DisableSendingThisToClients

This commit is contained in:
MrGadget 2024-11-05 12:08:06 -05:00
parent 9fdcdc64c7
commit 042fca2258

View File

@ -25,8 +25,7 @@ public enum Settings
Nothing, Nothing,
OnlySyncOnChange = 1 << 0, OnlySyncOnChange = 1 << 0,
UnreliableRedundancy = 1 << 1, UnreliableRedundancy = 1 << 1,
BaselineIsDelta = 1 << 2, BaselineIsDelta = 1 << 2
DisableSendingThisToClients = 1 << 3
} }
[Flags] [Flags]
@ -117,7 +116,6 @@ public enum DebugOptions
bool onlySyncOnChange => settings.HasFlag(Settings.OnlySyncOnChange); bool onlySyncOnChange => settings.HasFlag(Settings.OnlySyncOnChange);
bool unreliableRedundancy => settings.HasFlag(Settings.UnreliableRedundancy); bool unreliableRedundancy => settings.HasFlag(Settings.UnreliableRedundancy);
bool baselineIsDelta => settings.HasFlag(Settings.BaselineIsDelta); bool baselineIsDelta => settings.HasFlag(Settings.BaselineIsDelta);
bool disableSendingThisToClients => settings.HasFlag(Settings.DisableSendingThisToClients);
// sensitivity is for changed-detection, // sensitivity is for changed-detection,
// this is != precision, which is for quantization and delta compression. // this is != precision, which is for quantization and delta compression.
@ -138,11 +136,6 @@ public enum DebugOptions
//public bool syncRotation = true; //public bool syncRotation = true;
//public bool syncScale = false; //public bool syncScale = false;
//// BEGIN CUSTOM CHANGE /////////////////////////////////////////////////
//// TODO rename to avoid double negative
//public bool disableSendingThisToClients = false;
//// END CUSTOM CHANGE ///////////////////////////////////////////////////
//// debugging /////////////////////////////////////////////////////////// //// debugging ///////////////////////////////////////////////////////////
//[Header("Debug")] //[Header("Debug")]
//public bool debugDraw; //public bool debugDraw;
@ -1010,12 +1003,9 @@ void UpdateServer()
// perf: only grab NetworkTime.localTime property once. // perf: only grab NetworkTime.localTime property once.
double localTime = NetworkTime.localTime; double localTime = NetworkTime.localTime;
// should we broadcast at all? // broadcast
if (!disableSendingThisToClients) // CUSTOM CHANGE: see comment at definition UpdateServerBaseline(localTime);
{ UpdateServerDelta(localTime);
UpdateServerBaseline(localTime);
UpdateServerDelta(localTime);
}
// interpolate remote clients // interpolate remote clients
UpdateServerInterpolation(); UpdateServerInterpolation();
@ -1253,6 +1243,7 @@ void UpdateClient()
} }
} }
// Update() without LateUpdate() split: otherwise perf. is cut in half!
void Update() void Update()
{ {
// if server then always sync to others. // if server then always sync to others.