Esempio n. 1
0
 // Token: 0x06005983 RID: 22915 RVA: 0x001F1748 File Offset: 0x001EFB48
 private void LateUpdate()
 {
     if (VRC.Network.IsSadAndAlone && (this.LastPosition == null || (double)Time.time - this.LastPosition.Time > VRC.Network.SendInterval))
     {
         this.DiscontinuityHint = false;
         TweenFunctions.RecordValue <SyncPhysics.PositionEvent>(this.positionHistory, this.MakeCurrentPositionEvent((double)Time.time));
     }
     if (base.isMine)
     {
         if (this.hasRigidbody)
         {
             if (!this.isHeld)
             {
                 this.rigidbody.interpolation = RigidbodyInterpolation.Extrapolate;
             }
             else
             {
                 this.rigidbody.interpolation = RigidbodyInterpolation.None;
             }
             if (!this.rigidbody.IsSleeping() && !this.ShouldSleep())
             {
                 this.LastUnsettledTime = Time.time;
             }
         }
         this.UpdateFlags();
     }
     else if (this.hasRigidbody)
     {
         this.rigidbody.interpolation = RigidbodyInterpolation.None;
     }
 }
Esempio n. 2
0
 // Token: 0x0600598B RID: 22923 RVA: 0x001F1F1C File Offset: 0x001F031C
 public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
 {
     if (stream.isWriting)
     {
         SyncPhysics.PositionEvent positionEvent = this.MakeCurrentPositionEvent((double)Time.time);
         positionEvent.OwnerID = info.photonView.ownerId;
         bool flag = false;
         this.RecentOwnershipChange = flag;
         this.RecentCollision       = flag;
         this.SerializePositionEvent(positionEvent, stream, info);
         this.DiscontinuityHint = false;
         TweenFunctions.RecordValue <SyncPhysics.PositionEvent>(this.positionHistory, positionEvent);
     }
     else
     {
         SyncPhysics.PositionEvent positionEvent = this.DeserializePositionEvent(stream, info);
         positionEvent.OwnerID = info.sender.ID;
         if (this.positionHistory.Full && this.positionHistory[0].Time > (double)Time.time - 2.0 * VRC.Network.SimulationDelay(base.Owner))
         {
             this.positionHistory.Capacity *= 2;
         }
         if (positionEvent.Discontinuity)
         {
             this.positionHistory.Clear();
         }
         TweenFunctions.RecordValue <SyncPhysics.PositionEvent>(this.positionHistory, positionEvent);
         this.LastUnsettledTime = Time.time;
     }
 }
Esempio n. 3
0
    // Token: 0x06005989 RID: 22921 RVA: 0x001F1BEC File Offset: 0x001EFFEC
    public void DoPositionSync(double now, double delta)
    {
        if (base.isMine || (double)(Time.time - this.LastUnsettledTime) > VRC.Network.SimulationDelay(base.Owner) * 2.0)
        {
            return;
        }
        VRC.Player componentInParent      = base.gameObject.GetComponentInParent <VRC.Player>();
        List <VRC_StationInternal> source = VRC_StationInternal.FindActiveStations(componentInParent);

        if (this.isPlayer)
        {
            if ((from s in source
                 where s.isImmobilized
                 select s).FirstOrDefault <VRC_StationInternal>() != null)
            {
                return;
            }
        }
        VRC_StationInternal componentInParent2  = base.gameObject.GetComponentInParent <VRC_StationInternal>();
        VRC_StationInternal componentInChildren = base.gameObject.GetComponentInChildren <VRC_StationInternal>();

        if (this.hasCamera || base.gameObject.IsVisible() || (componentInParent2 != null && componentInParent2.Occupant != null && componentInParent2.Occupant.isLocal) || (componentInChildren != null && componentInChildren.Occupant != null && componentInChildren.Occupant.isLocal))
        {
            if (SyncPhysics.f__mg2 == null)
            {
                SyncPhysics.f__mg2 = new TweenFunctions.TweenFunction <SyncPhysics.PositionEvent>(TweenFunctions.CatMullRomTween <SyncPhysics.PositionEvent>);
            }
            this.InterpolateFunction = SyncPhysics.f__mg2;
        }
        else
        {
            if (SyncPhysics.f__mg3 == null)
            {
                SyncPhysics.f__mg3 = new TweenFunctions.TweenFunction <SyncPhysics.PositionEvent>(TweenFunctions.NoTween <SyncPhysics.PositionEvent>);
            }
            this.InterpolateFunction = SyncPhysics.f__mg3;
        }
        double num = now - VRC.Network.SimulationDelay(base.Owner);

        SyncPhysics.PositionEvent positionEvent = TweenFunctions.Tween <SyncPhysics.PositionEvent>(this.positionHistory, this.InterpolateFunction, num, VRC.Network.ExpectedInterval, (!this.isPlayer) ? -1 : base.photonView.viewID);
        if (positionEvent == null && this.positionHistory.Full && this.positionHistory[0].Time > num)
        {
            this.positionHistory.Capacity *= 2;
        }
        if (positionEvent != null)
        {
            this.DoAdjustment(positionEvent);
        }
    }
Esempio n. 4
0
    public static float Ease(float from, float to, float t, EaseType type)
    {
        switch (type)
        {
        case EaseType.Linear:
            return(TweenFunctions.Linear(t, from, to, 1f));

        case EaseType.QuadEaseOut:
            return(TweenFunctions.QuadEaseOut(t, from, to, 1f));

        case EaseType.QuadEaseIn:
            return(TweenFunctions.QuadEaseIn(t, from, to, 1f));

        case EaseType.QuadEaseInOut:
            return(TweenFunctions.QuadEaseInOut(t, from, to, 1f));

        case EaseType.QuadEaseOutIn:
            return(TweenFunctions.QuadEaseOutIn(t, from, to, 1f));

        case EaseType.ExpoEaseOut:
            return(TweenFunctions.ExpoEaseOut(t, from, to, 1f));

        case EaseType.ExpoEaseIn:
            return(TweenFunctions.ExpoEaseIn(t, from, to, 1f));

        case EaseType.ExpoEaseInOut:
            return(TweenFunctions.ExpoEaseInOut(t, from, to, 1f));

        case EaseType.ExpoEaseOutIn:
            return(TweenFunctions.ExpoEaseOutIn(t, from, to, 1f));

        case EaseType.CubicEaseOut:
            return(TweenFunctions.CubicEaseOut(t, from, to, 1f));

        case EaseType.CubicEaseIn:
            return(TweenFunctions.CubicEaseIn(t, from, to, 1f));

        case EaseType.CubicEaseInOut:
            return(TweenFunctions.CubicEaseInOut(t, from, to, 1f));

        case EaseType.CubicEaseOutIn:
            return(TweenFunctions.CubicEaseOutIn(t, from, to, 1f));

        case EaseType.QuartEaseOut:
            return(TweenFunctions.QuartEaseOut(t, from, to, 1f));

        case EaseType.QuartEaseIn:
            return(TweenFunctions.QuartEaseIn(t, from, to, 1f));

        case EaseType.QuartEaseInOut:
            return(TweenFunctions.QuartEaseInOut(t, from, to, 1f));

        case EaseType.QuartEaseOutIn:
            return(TweenFunctions.QuartEaseOutIn(t, from, to, 1f));

        case EaseType.QuintEaseOut:
            return(TweenFunctions.QuintEaseOut(t, from, to, 1f));

        case EaseType.QuintEaseIn:
            return(TweenFunctions.QuintEaseIn(t, from, to, 1f));

        case EaseType.QuintEaseInOut:
            return(TweenFunctions.QuintEaseInOut(t, from, to, 1f));

        case EaseType.QuintEaseOutIn:
            return(TweenFunctions.QuintEaseOutIn(t, from, to, 1f));

        case EaseType.CircEaseOut:
            return(TweenFunctions.CircEaseOut(t, from, to, 1f));

        case EaseType.CircEaseIn:
            return(TweenFunctions.CircEaseIn(t, from, to, 1f));

        case EaseType.CircEaseInOut:
            return(TweenFunctions.CircEaseInOut(t, from, to, 1f));

        case EaseType.CircEaseOutIn:
            return(TweenFunctions.CircEaseOutIn(t, from, to, 1f));

        case EaseType.SineEaseOut:
            return(TweenFunctions.SineEaseOut(t, from, to, 1f));

        case EaseType.SineEaseIn:
            return(TweenFunctions.SineEaseIn(t, from, to, 1f));

        case EaseType.SineEaseInOut:
            return(TweenFunctions.SineEaseInOut(t, from, to, 1f));

        case EaseType.SineEaseOutIn:
            return(TweenFunctions.SineEaseOutIn(t, from, to, 1f));

        case EaseType.ElasticEaseOut:
            return(TweenFunctions.ElasticEaseOut(t, from, to, 1f));

        case EaseType.ElasticEaseIn:
            return(TweenFunctions.ElasticEaseIn(t, from, to, 1f));

        case EaseType.ElasticEaseInOut:
            return(TweenFunctions.ElasticEaseInOut(t, from, to, 1f));

        case EaseType.ElasticEaseOutIn:
            return(TweenFunctions.ElasticEaseOutIn(t, from, to, 1f));

        case EaseType.BounceEaseOut:
            return(TweenFunctions.BounceEaseOut(t, from, to, 1f));

        case EaseType.BounceEaseIn:
            return(TweenFunctions.BounceEaseIn(t, from, to, 1f));

        case EaseType.BounceEaseInOut:
            return(TweenFunctions.BounceEaseInOut(t, from, to, 1f));

        case EaseType.BounceEaseOutIn:
            return(TweenFunctions.BounceEaseOutIn(t, from, to, 1f));

        case EaseType.BackEaseOut:
            return(TweenFunctions.BackEaseOut(t, from, to, 1f));

        case EaseType.BackEaseIn:
            return(TweenFunctions.BackEaseIn(t, from, to, 1f));

        case EaseType.BackEaseInOut:
            return(TweenFunctions.BackEaseInOut(t, from, to, 1f));

        case EaseType.BackEaseOutIn:
            return(TweenFunctions.BackEaseOutIn(t, from, to, 1f));

        default:
            throw new ArgumentOutOfRangeException("type");
        }
    }
Esempio n. 5
0
    // Token: 0x06005962 RID: 22882 RVA: 0x001F0CC0 File Offset: 0x001EF0C0
    public void OnDrawGizmos()
    {
        if (this.positionHistory.Count < 3)
        {
            return;
        }
        Vector3 zero  = Vector3.zero;
        int     index = this.positionHistory.Count - 1;

        SyncPhysics.PositionEvent positionEvent = this.positionHistory[0];
        for (double num = this.positionHistory[0].Time; num < this.positionHistory[index].Time; num += (double)Time.smoothDeltaTime)
        {
            SyncPhysics.PositionEvent positionEvent2 = TweenFunctions.Tween <SyncPhysics.PositionEvent>(this.positionHistory, this.InterpolateFunction, num, VRC.Network.ExpectedInterval, -1);
            if (positionEvent2 != null)
            {
                Color color = Color.white;
                if (positionEvent2.Discontinuity)
                {
                    color = Color.magenta;
                }
                if (positionEvent != null)
                {
                    Gizmos.color = color;
                    Gizmos.DrawLine(positionEvent.Position, positionEvent2.Position + zero);
                }
                positionEvent = positionEvent2;
            }
        }
        double time              = this.positionHistory[0].Time;
        double time2             = this.positionHistory[index].Time;
        double num2              = double.MinValue;
        int    localInstigatorID = VRC.Network.LocalInstigatorID;

        foreach (SyncPhysics.PositionEvent positionEvent3 in this.positionHistory)
        {
            Color color2 = Color.yellow;
            if (positionEvent3.isCollision)
            {
                color2 = Color.white;
            }
            else if (positionEvent3.RecentOwnershipChange)
            {
                color2 = Color.green;
            }
            else if (positionEvent3.HeldInHand != VRC_Pickup.PickupHand.None)
            {
                color2 = Color.black;
            }
            else if (positionEvent3.isSleeping)
            {
                color2 = Color.blue;
            }
            else if (positionEvent3.Time == num2)
            {
                color2 = Color.magenta;
            }
            num2         = positionEvent3.Time;
            Gizmos.color = color2;
            if (positionEvent3.OwnerID == localInstigatorID)
            {
                Gizmos.DrawWireSphere(positionEvent3.Position, 0.05f);
            }
            else
            {
                Gizmos.DrawWireCube(positionEvent3.Position, new Vector3(0.05f, 0.05f, 0.05f));
            }
        }
    }
Esempio n. 6
0
 // Token: 0x06004F51 RID: 20305 RVA: 0x001AC7FC File Offset: 0x001AABFC
 public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
 {
     PoseRecorder.PoseEvent poseEvent = new PoseRecorder.PoseEvent();
     if (stream.isWriting)
     {
         if (this.ragDoll != null && this.ragDoll.IsRagDolled)
         {
             PoseRecorder.poseContents = 0;
         }
         poseEvent.poseContents    = PoseRecorder.poseContents;
         PoseRecorder.poseContents = 0;
         stream.SendNext((short)poseEvent.poseContents);
         if (poseEvent.Contains(PoseRecorder.PoseContents.RootOffset))
         {
             poseEvent.rootOffset = this.offset.position;
             this.SerializeVector(stream, poseEvent.rootOffset);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.BaseSkeleton))
         {
             for (int i = 0; i < this.bones.Length; i++)
             {
                 poseEvent.boneRotations[i] = ((!(this.bones[i] == null)) ? this.bones[i].rotation : Quaternion.identity);
                 this.SerializeQuaternion(stream, poseEvent.boneRotations[i]);
             }
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HandGesture))
         {
             int num  = 255;
             int num2 = 255;
             if (this.handgest != null)
             {
                 this.handgest.GetRemoteHandGestures(out num, out num2);
             }
             stream.SendNext((byte)num);
             stream.SendNext((byte)num2);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationL))
         {
             if (this.ik != null)
             {
                 this.ik.GetHandEffectorLeft(out poseEvent.leftHandPosition, out poseEvent.leftHandRotation);
             }
             this.SerializeVector(stream, poseEvent.leftHandPosition);
             this.SerializeQuaternion(stream, poseEvent.leftHandRotation);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationR))
         {
             if (this.ik != null)
             {
                 this.ik.GetHandEffectorRight(out poseEvent.rightHandPosition, out poseEvent.rightHandRotation);
             }
             this.SerializeVector(stream, poseEvent.rightHandPosition);
             this.SerializeQuaternion(stream, poseEvent.rightHandRotation);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HeadEffectorPositionOrientation))
         {
             if (this.ik != null)
             {
                 this.ik.GetHeadEffector(out poseEvent.headPosition, out poseEvent.headRotation);
             }
             this.SerializeVector(stream, poseEvent.headPosition);
             this.SerializeQuaternion(stream, poseEvent.headRotation);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HipEffectorPositionOrientation))
         {
             if (this.ik != null)
             {
                 this.ik.GetHipEffector(out poseEvent.hipPosition, out poseEvent.hipRotation);
             }
             this.SerializeVector(stream, poseEvent.hipPosition);
             this.SerializeQuaternion(stream, poseEvent.hipRotation);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationL))
         {
             if (this.ik != null)
             {
                 this.ik.GetFootEffectorLeft(out poseEvent.leftFootPosition, out poseEvent.leftFootRotation);
             }
             this.SerializeVector(stream, poseEvent.leftFootPosition);
             this.SerializeQuaternion(stream, poseEvent.leftFootRotation);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationR))
         {
             if (this.ik != null)
             {
                 this.ik.GetFootEffectorRight(out poseEvent.rightFootPosition, out poseEvent.rightFootRotation);
             }
             this.SerializeVector(stream, poseEvent.rightFootPosition);
             this.SerializeQuaternion(stream, poseEvent.rightFootRotation);
         }
     }
     else
     {
         poseEvent.poseContents = (int)((short)stream.ReceiveNext());
         if (poseEvent.Contains(PoseRecorder.PoseContents.RootOffset))
         {
             poseEvent.rootOffset = this.DeserializeVector(stream);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.BaseSkeleton))
         {
             for (int j = 0; j < this.bones.Length; j++)
             {
                 poseEvent.boneRotations[j] = this.DeserializeQuaternion(stream);
             }
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HandGesture))
         {
             poseEvent.handGestureLeft  = (byte)stream.ReceiveNext();
             poseEvent.handGestureRight = (byte)stream.ReceiveNext();
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationL))
         {
             poseEvent.leftHandPosition = this.DeserializeVector(stream);
             poseEvent.leftHandRotation = this.DeserializeQuaternion(stream);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationR))
         {
             poseEvent.rightHandPosition = this.DeserializeVector(stream);
             poseEvent.rightHandRotation = this.DeserializeQuaternion(stream);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HeadEffectorPositionOrientation))
         {
             poseEvent.headPosition = this.DeserializeVector(stream);
             poseEvent.headRotation = this.DeserializeQuaternion(stream);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.HipEffectorPositionOrientation))
         {
             poseEvent.hipPosition = this.DeserializeVector(stream);
             poseEvent.hipRotation = this.DeserializeQuaternion(stream);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationL))
         {
             poseEvent.leftFootPosition = this.DeserializeVector(stream);
             poseEvent.leftFootRotation = this.DeserializeQuaternion(stream);
         }
         if (poseEvent.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationR))
         {
             poseEvent.rightFootPosition = this.DeserializeVector(stream);
             poseEvent.rightFootRotation = this.DeserializeQuaternion(stream);
         }
     }
     poseEvent.timeReceived = (double)Time.time;
     TweenFunctions.RecordValue <PoseRecorder.PoseEvent>(this.eventHistory, poseEvent);
 }
Esempio n. 7
0
    // Token: 0x06004F57 RID: 20311 RVA: 0x001AD0AC File Offset: 0x001AB4AC
    public void DoAdjustment(float now)
    {
        if (base.isMine || this.animator == null)
        {
            return;
        }
        IList <PoseRecorder.PoseEvent> eventList = this.eventHistory;

        if (PoseRecorder.f__mg0 == null)
        {
            PoseRecorder.f__mg0 = new TweenFunctions.TweenFunction <PoseRecorder.PoseEvent>(PoseRecorder.LinearTweenFunction);
        }
        PoseRecorder.PoseEvent poseEvent = TweenFunctions.Tween <PoseRecorder.PoseEvent>(eventList, PoseRecorder.f__mg0, (double)now - VRC.Network.SimulationDelay(base.Owner), this.ExpectedInterval, -1);
        if (poseEvent == null || poseEvent.Contains(PoseRecorder.PoseContents.Nothing))
        {
            return;
        }
        if (poseEvent.Contains(PoseRecorder.PoseContents.BaseSkeleton))
        {
            this.animator.enabled = false;
            for (int i = 0; i < 19; i++)
            {
                Quaternion localRotation = this.bones[i].localRotation;
                PoseRecorder.MaybeSetRotation(this.bones[i].localRotation, poseEvent.boneRotations[i], ref localRotation);
                this.bones[i].localRotation = localRotation;
            }
        }
        if (this.ik != null)
        {
            if (poseEvent.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationL))
            {
                this.MaybeSetEffector(new PoseRecorder.GetEffector(this.ik.GetHandEffectorLeft), new PoseRecorder.SetEffector(this.ik.SetRemoteHandEffectorLeft), poseEvent.leftHandPosition, poseEvent.leftHandRotation);
            }
            else
            {
                this.ik.ClearRemoteHandEffectorLeft();
            }
            if (poseEvent.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationR))
            {
                this.MaybeSetEffector(new PoseRecorder.GetEffector(this.ik.GetHandEffectorRight), new PoseRecorder.SetEffector(this.ik.SetRemoteHandEffectorRight), poseEvent.rightHandPosition, poseEvent.rightHandRotation);
            }
            else
            {
                this.ik.ClearRemoteHandEffectorRight();
            }
            if (poseEvent.Contains(PoseRecorder.PoseContents.HeadEffectorPositionOrientation))
            {
                this.MaybeSetEffector(new PoseRecorder.GetEffector(this.ik.GetHeadEffector), new PoseRecorder.SetEffector(this.ik.SetRemoteHeadEffector), poseEvent.headPosition, poseEvent.headRotation);
            }
            if (poseEvent.Contains(PoseRecorder.PoseContents.HipEffectorPositionOrientation))
            {
                this.MaybeSetEffector(new PoseRecorder.GetEffector(this.ik.GetHipEffector), new PoseRecorder.SetEffector(this.ik.SetRemoteHipEffector), poseEvent.hipPosition, poseEvent.hipRotation);
            }
            else
            {
                this.ik.ClearRemoteHipEffector();
            }
            if (poseEvent.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationL))
            {
                this.MaybeSetEffector(new PoseRecorder.GetEffector(this.ik.GetFootEffectorLeft), new PoseRecorder.SetEffector(this.ik.SetRemoteFootEffectorLeft), poseEvent.leftFootPosition, poseEvent.leftFootRotation);
            }
            else
            {
                this.ik.ClearRemoteFootEffectorLeft();
            }
            if (poseEvent.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationR))
            {
                this.MaybeSetEffector(new PoseRecorder.GetEffector(this.ik.GetFootEffectorRight), new PoseRecorder.SetEffector(this.ik.SetRemoteFootEffectorRight), poseEvent.rightFootPosition, poseEvent.rightFootRotation);
            }
            else
            {
                this.ik.ClearRemoteFootEffectorRight();
            }
        }
        if (poseEvent.Contains(PoseRecorder.PoseContents.HandGesture))
        {
            if (this.handgest != null)
            {
                this.handgest.SetRemoteHandGestures((int)poseEvent.handGestureLeft, (int)poseEvent.handGestureRight);
            }
        }
        else if (this.handgest != null)
        {
            this.handgest.ClearRemoteHandGestures();
        }
        if (this.offset != null && poseEvent.Contains(PoseRecorder.PoseContents.RootOffset))
        {
            this.offset.localPosition = Vector3.zero;
        }
        if (this.animator != null && poseEvent.Contains(PoseRecorder.PoseContents.BaseSkeleton))
        {
            this.animator.enabled = true;
        }
        if (base.Owner.playerNet.WasRecentlyDiscontinuous)
        {
            this.ik.Reset(true);
        }
    }
Esempio n. 8
0
    // Token: 0x06004F53 RID: 20307 RVA: 0x001ACCEC File Offset: 0x001AB0EC
    private static PoseRecorder.PoseEvent LinearTweenFunction(IList <PoseRecorder.PoseEvent> l, int idx, double delta)
    {
        PoseRecorder.PoseEvent poseEvent  = l[idx];
        PoseRecorder.PoseEvent poseEvent2 = l[TweenFunctions.FindNextIndex <PoseRecorder.PoseEvent>(l, idx)];
        float t = (float)delta;

        PoseRecorder.PoseEvent poseEvent3 = new PoseRecorder.PoseEvent
        {
            poseContents = (poseEvent.poseContents & poseEvent2.poseContents),
            timeReceived = (poseEvent2.timeReceived - poseEvent.timeReceived) * delta + poseEvent.timeReceived
        };
        if (poseEvent2.Contains(PoseRecorder.PoseContents.HandGesture))
        {
            poseEvent3.handGestureLeft  = poseEvent2.handGestureLeft;
            poseEvent3.handGestureRight = poseEvent2.handGestureRight;
            poseEvent3.poseContents    |= 16;
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.Nothing))
        {
            return(poseEvent3);
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.RootOffset))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.rootOffset, Vector3.Lerp(poseEvent.rootOffset, poseEvent2.rootOffset, t), ref poseEvent3.rootOffset);
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.BaseSkeleton))
        {
            poseEvent3.boneRotations = new Quaternion[19];
            for (int i = 0; i < 19; i++)
            {
                poseEvent3.boneRotations[i] = Quaternion.Slerp(poseEvent.boneRotations[i], poseEvent2.boneRotations[i], t).Normalize();
            }
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationL))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.leftHandPosition, Vector3.Lerp(poseEvent.leftHandPosition, poseEvent2.leftHandPosition, t), ref poseEvent3.leftHandPosition);
            poseEvent3.leftHandRotation = Quaternion.Slerp(poseEvent.leftHandRotation, poseEvent2.leftHandRotation, t).Normalize();
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.HandEffectorPositionOrientationR))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.rightHandPosition, Vector3.Lerp(poseEvent.rightHandPosition, poseEvent2.rightHandPosition, t), ref poseEvent3.rightHandPosition);
            poseEvent3.rightHandRotation = Quaternion.Slerp(poseEvent.rightHandRotation, poseEvent2.rightHandRotation, t).Normalize();
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.HeadEffectorPositionOrientation))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.headPosition, Vector3.Lerp(poseEvent.headPosition, poseEvent2.headPosition, t), ref poseEvent3.headPosition);
            poseEvent3.headRotation = Quaternion.Slerp(poseEvent.headRotation, poseEvent2.headRotation, t).Normalize();
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.HipEffectorPositionOrientation))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.hipPosition, Vector3.Lerp(poseEvent.hipPosition, poseEvent2.hipPosition, t), ref poseEvent3.hipPosition);
            poseEvent3.hipRotation = Quaternion.Slerp(poseEvent.hipRotation, poseEvent2.hipRotation, t).Normalize();
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationL))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.leftFootPosition, Vector3.Lerp(poseEvent.leftFootPosition, poseEvent2.leftFootPosition, t), ref poseEvent3.leftFootPosition);
            poseEvent3.leftFootRotation = Quaternion.Slerp(poseEvent.leftFootRotation, poseEvent2.leftFootRotation, t).Normalize();
        }
        if (poseEvent3.Contains(PoseRecorder.PoseContents.FootEffectorPositionOrientationR))
        {
            PoseRecorder.MaybeSetPosition(poseEvent.rightFootPosition, Vector3.Lerp(poseEvent.rightFootPosition, poseEvent2.rightFootPosition, t), ref poseEvent3.rightFootPosition);
            poseEvent3.rightFootRotation = Quaternion.Slerp(poseEvent.rightFootRotation, poseEvent2.rightFootRotation, t).Normalize();
        }
        return(poseEvent3);
    }