Пример #1
0
        protected virtual void OnRemoteTransformSync(Packet_Entity_TransformSync packet)
        {
            this._animatorEntity.SteerFaceDirectionTo(MPMiscs.XZAnglesToForward(packet.StateSync.XzAngle));
            Vector3 targetPosition = MPMiscs.Convert(packet.StateSync.XzPosition);
            Vector3 vector2        = targetPosition - this._animatorEntity.XZPosition;

            if (vector2.sqrMagnitude > 8f)
            {
                this._animatorEntity.SyncPosition(targetPosition);
            }
        }
Пример #2
0
 protected virtual void OnRemoteEntityAnimatorStateChanged(Packet_Entity_AnimatorStateChange packet)
 {
     this._animatorEntity.SyncAnimatorState(packet.ToStateHash, packet.NormalizedTimeTo);
     this._animatorEntity.SteerFaceDirectionTo(MPMiscs.XZAnglesToForward(packet.StateSync.XzAngle));
 }