예제 #1
0
        protected override void OnSimulate()
        {
            long hash = LockstepManager.GetStateHash();

            if (IsPlayingBack)
            {
                if (LockstepManager.FrameCount < Hashes.PeakCount &&
                    Hashes.arrayAllocation[LockstepManager.FrameCount])
                {
                    long lastHash = Hashes [LockstepManager.FrameCount];
                    if (lastHash != hash)
                    {
                        Debug.Log("Desynced");                        // frame " + LockstepManager.FrameCount);
                    }
                }
            }
            else
            {
                Hashes.InsertAt(hash, LockstepManager.FrameCount);
            }
        }