Skip to content

Commit

Permalink
Fix the current clock value being synced (!!)
Browse files Browse the repository at this point in the history
  • Loading branch information
FairlySadPanda committed Apr 12, 2021
1 parent 803ef7a commit 02530f1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Assets/VRCBilliardsCE/Scripts/PoolStateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ public class PoolStateManager : UdonSharpBehaviour
/// <summary>
/// 20:0 (0xffff) Latest packet number
/// </summary>
[UdonSynced]
private uint currentClock;
/// <summary>
/// 21:0 (0xffff) Game number
Expand Down Expand Up @@ -1584,11 +1583,11 @@ private void ReadNetworkData()

// TODO: Investigate why clock values are not being incremented correctly.
// It looks like Clock can be discarded. IMO it is still a useful check, but it can be safely disabled ATM.
// if (newClock <= currentClock)
// {
// Debug.LogWarning($"[FairlySadPanda.PoolStateManager] [ReadNetworkData] Received a new network payload, but the clock {newClock} was not greater than the current clock value {currentClock}");
// return;
// }
if (newClock <= currentClock)
{
Debug.LogWarning($"[FairlySadPanda.PoolStateManager] [ReadNetworkData] Received a new network payload, but the clock {newClock} was not greater than the current clock value {currentClock}");
return;
}

currentClock = newClock;

Expand Down

0 comments on commit 02530f1

Please sign in to comment.