예제 #1
0
 // Token: 0x06005ABD RID: 23229 RVA: 0x001FA5B0 File Offset: 0x001F89B0
 private void AddUseExit(VRC.Player player)
 {
     if (player.isLocal && !this.disableStationExit)
     {
         StationUseExit stationUseExit = base.gameObject.AddComponent <StationUseExit>();
         stationUseExit.localUser = player.gameObject;
     }
 }
예제 #2
0
    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);
    }