Fixed a rare issue that causes an OnChanged method not to be invoked when a misprediction occurs (on another variable) that causes the variable to change but no OnChanged callback is ever invoked, even though the value before rollback and the value after rollback & resimulation weren't the same.

This commit is contained in:
Karrar
2024-09-02 18:18:27 +03:00
parent 1a28008960
commit 737209385a
10 changed files with 3 additions and 3 deletions

View File

@@ -63,8 +63,8 @@ namespace Netick.Samples
public void DrawIcons()
{
var pktLossIconPos = PacketLossIconOffset + (Screen.width * Vector2.right);
var latencyIconPos = LatencyIconOffset + (Screen.width * Vector2.right);
var serverLagIconPos = ServerLagIconOffset + (Screen.width * Vector2.right);
var latencyIconPos = LatencyIconOffset + (Screen.width * Vector2.right);
var serverLagIconPos = ServerLagIconOffset + (Screen.width * Vector2.right);
var pktLoss = Mathf.Max(Sandbox.InPacketLoss, Sandbox.OutPacketLoss) * 100; // multiplying by 100 to convert from a decimal to a percentage.
var rtt = Sandbox.RTT * 1000f; // multiplying by 1000 to convert from seconds to milliseconds.