// Token: 0x06005AB9 RID: 23225 RVA: 0x001F9F8C File Offset: 0x001F838C public void ApplySeatedAnimation(VRC.Player player) { RuntimeAnimatorController runtimeAnimatorController = this.animatorController; VRCAvatarManager componentInChildren = player.GetComponentInChildren <VRCAvatarManager>(); if (runtimeAnimatorController != null) { if (runtimeAnimatorController.name == "SitStation") { runtimeAnimatorController = componentInChildren.GetSitAnimController(); } if (runtimeAnimatorController == null) { Debug.LogError("SitAnimController on " + player.name + " is not available.", this); } else { this.AttachAnimatorControllerTo(player, runtimeAnimatorController); } } else { runtimeAnimatorController = componentInChildren.GetSitAnimController(); if (runtimeAnimatorController == null) { Debug.LogError("SitAnimController on " + player.name + " is not available.", this); } else { this.AttachAnimatorControllerTo(player, runtimeAnimatorController); } } }
// Token: 0x06005AB6 RID: 23222 RVA: 0x001F9D5C File Offset: 0x001F815C public bool PlayerCanUseStation(VRC.Player player, bool log = false) { if (player == null) { return(false); } if (this.Occupant != null && this.Occupant.playerApi.playerId != player.playerApi.playerId) { if (log) { Debug.LogError(player.name + " cannot use station because it is occupied.", this); } return(false); } VRCAvatarManager componentInChildren = player.GetComponentInChildren <VRCAvatarManager>(); if (componentInChildren == null) { if (log) { Debug.LogError(player.name + " cannot use station because they lack an AvatarManager.", this); } return(false); } if (!componentInChildren.IsHuman) { if (log) { Debug.LogError(player.name + " cannot use station because their avatar is not human.", this); } return(false); } if (this.isSeated) { if (player.GetComponentInChildren <AnimatorControllerManager>() == null) { if (log) { Debug.LogError(player.name + " cannot use station because they have no AnimatorControllerManager.", this); } return(false); } RuntimeAnimatorController runtimeAnimatorController = this.animatorController; if (runtimeAnimatorController != null) { if (runtimeAnimatorController.name == "SitStation") { runtimeAnimatorController = componentInChildren.GetSitAnimController(); } if (runtimeAnimatorController == null) { if (log) { Debug.LogError(player.name + " cannot use station because they lack a sit animation controller.", this); } return(false); } } else { runtimeAnimatorController = componentInChildren.GetSitAnimController(); if (runtimeAnimatorController == null) { if (log) { Debug.LogError(player.name + " cannot use station because they lack a sit animation controller.", this); } return(false); } } } return(true); }