private void InternalExitStation(VRC.Player player) { if (this.Occupant == null || player == null || player != this._occupant) { return; } VRC_StationInternal.FlagDiscontinuity(player); StationUseExit component = base.GetComponent <StationUseExit>(); if (component != null) { UnityEngine.Object.Destroy(component); } this.Occupant = null; if (this.animatorController != null || this.isSeated) { this.DetachAnimatorControllerFrom(player); if (player.isLocal) { VRCTrackingManager.UseAvatarStationViewPoint(false); LocomotionInputController component2 = player.GetComponent <LocomotionInputController>(); if (component2 != null) { component2.immobilize = false; } VRCMotionState component3 = player.GetComponent <VRCMotionState>(); if (component3 != null) { component3.IsSeated = false; component3.InVehicle = false; } } } if (this.stationControls != null) { this.stationControls.controllingPlayer = null; } Collider component4 = player.GetComponent <Collider>(); if (component4 != null) { component4.enabled = true; } this.DetachInputControllerFrom(player.gameObject); this.ReleasePlayerTransform(player.gameObject); player.currentStation = null; if (TutorialManager.Instance != null && player.isLocal && this.isImmobilized) { TutorialManager.Instance.DeactivateObjectLabel(null); TutorialManager.Instance.DeactivateControllerLabel(ControllerHand.Left, ControllerInputUI.TrackpadTop); } if (player.isLocal) { VRCTrackingManager.RestoreLevel(); } VRC_StationInternal.RemoveActiveStation(this); base.SendMessage("OnStationExited", SendMessageOptions.DontRequireReceiver); }
// Token: 0x06005433 RID: 21555 RVA: 0x001D14AC File Offset: 0x001CF8AC public override void Awake() { base.Awake(); this.vrcPlayer = base.GetComponent <VRCPlayer>(); if (this.vrcPlayer == null) { Debug.LogError("PlayerNet present on object without VRCPlayer in hierarchy."); UnityEngine.Object.Destroy(this); return; } VRCMotionState motionState = base.GetComponent <VRCMotionState>(); this.positionSync = base.gameObject.GetOrAddComponent <SyncPhysics>(); if (motionState != null) { this.positionSync.GetVelocity = delegate { if (this.isMine) { return(motionState.PlayerVelocity); } return((this.positionSync.LastReplicatedPosition != null) ? this.positionSync.LastReplicatedPosition.Velocity : this.positionSync.ObservedVelocity); }; this.positionSync.SetVelocity = delegate(Vector3 velocity) { if (velocity.magnitude < 0.0001f) { if (this.positionSync.ObservedVelocity.AlmostEquals(Vector3.zero, 0.0001f)) { motionState.PlayerVelocity = Vector3.zero; } else { motionState.PlayerVelocity = velocity.normalized * 0.0001f; } } else { motionState.PlayerVelocity = velocity; } }; } else { this.positionSync.GetVelocity = (() => this.positionSync.ObservedVelocity); } }
static void smethod_57(VRCMotionState vrcmotionState_1) { vrcmotionState_1.Reset(); }