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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -63,8 +63,8 @@ namespace Netick.Samples
public void DrawIcons() public void DrawIcons()
{ {
var pktLossIconPos = PacketLossIconOffset + (Screen.width * Vector2.right); var pktLossIconPos = PacketLossIconOffset + (Screen.width * Vector2.right);
var latencyIconPos = LatencyIconOffset + (Screen.width * Vector2.right); var latencyIconPos = LatencyIconOffset + (Screen.width * Vector2.right);
var serverLagIconPos = ServerLagIconOffset + (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 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. var rtt = Sandbox.RTT * 1000f; // multiplying by 1000 to convert from seconds to milliseconds.

View File

@@ -1,6 +1,6 @@
{ {
"name": "com.karrar.netick", "name": "com.karrar.netick",
"version": "0.12.24", "version": "0.12.25",
"displayName": "Netick", "displayName": "Netick",
"description": "A networking solution for Unity", "description": "A networking solution for Unity",
"unity": "2021.3", "unity": "2021.3",