// Token: 0x060053ED RID: 21485 RVA: 0x001CF7A8 File Offset: 0x001CDBA8
    private IEnumerator Die()
    {
        this._dead = true;
        if (!base.isMine)
        {
            yield break;
        }
        Debug.Log("Local Death");
        InputStateControllerManager inputControllerManager = VRCPlayer.Instance.GetComponent <InputStateControllerManager>();

        inputControllerManager.PushInputController("ImmobileInputController");
        VRC.Network.RPC(VRC_EventHandler.VrcTargetType.All, base.gameObject, "ShowDeath", new object[0]);
        yield return(new WaitForSeconds(RagdollController.DeathTime));

        inputControllerManager.PopInputController();
        VRCPlayerModFactory.HealthOnDeathAction healthOnDeathAction = this.mOnDeathAction;
        if (healthOnDeathAction != VRCPlayerModFactory.HealthOnDeathAction.Respawn)
        {
            if (healthOnDeathAction != VRCPlayerModFactory.HealthOnDeathAction.Kick)
            {
            }
            Debug.Log("Local Nothing");
            this.ResetHealth();
            SpawnManager.Instance.RespawnPlayerUsingOrder(base.Owner.vrcPlayer);
        }
        else
        {
            Debug.Log("Local Respawn");
            this.ResetHealth();
            SpawnManager.Instance.RespawnPlayerUsingOrder(base.Owner.vrcPlayer);
        }
        Debug.Log("Local Complete");
        this.DeathCoroutine = null;
        yield break;
    }
Exemple #2
0
 public VRCPlayerModProperty(string propName, VRCPlayerModFactory.HealthOnDeathAction propValue)
 {
     name = propName;
     onDeathActionValue = propValue;
     type = new VRCSerializableSystemType(typeof(VRCPlayerModFactory.HealthOnDeathAction));
 }