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); } }
protected virtual void OnRemoteEntityAnimatorStateChanged(Packet_Entity_AnimatorStateChange packet) { this._animatorEntity.SyncAnimatorState(packet.ToStateHash, packet.NormalizedTimeTo); this._animatorEntity.SteerFaceDirectionTo(MPMiscs.XZAnglesToForward(packet.StateSync.XzAngle)); }