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