// Token: 0x060032C2 RID: 12994 RVA: 0x000C02C0 File Offset: 0x000BE4C0
 public virtual void Local_CancelArrow(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBowWeaponItem itemInstance, ref global::HumanController.InputSample sample)
 {
     if (vm)
     {
         vm.CrossFade("cancelarrow", 0.15f);
     }
     this.MakeReadyIn(itemInstance, this.fireRate * 3f);
     this.cancelArrowSound.PlayLocal(Camera.main.transform, Vector3.zero, 1f, 1f, 3f, 20f, 0);
 }
 // Token: 0x060032C5 RID: 12997 RVA: 0x000C033C File Offset: 0x000BE53C
 public virtual void Local_GetTired(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBowWeaponItem itemInstance, ref global::HumanController.InputSample sample)
 {
     if (itemInstance.tired)
     {
         return;
     }
     if (vm)
     {
         vm.CrossFade("tiredloop", 5f);
     }
 }
    // Token: 0x0600353A RID: 13626 RVA: 0x000C3E1C File Offset: 0x000C201C
    public virtual void Local_MidSwing(global::ViewModel vm, global::ItemRepresentation itemRep, global::IMeleeWeaponItem itemInstance, ref global::HumanController.InputSample sample)
    {
        global::Character character = itemInstance.character;

        if (character == null)
        {
            return;
        }
        Ray                 eyesRay     = character.eyesRay;
        Collider            collider    = null;
        Vector3             zero        = Vector3.zero;
        Vector3             up          = Vector3.up;
        global::NetEntityID netEntityID = global::NetEntityID.unassigned;
        bool                flag        = false;
        BodyPart            bodyPart;
        bool                flag2      = this.Physics2SphereCast(eyesRay, 0.3f, this.GetRange(), 406721553, out zero, out up, out collider, out bodyPart);
        bool                flag3      = false;
        global::TakeDamage  takeDamage = null;

        if (flag2)
        {
            IDBase idbase;
            global::TransformHelpers.GetIDBaseFromCollider(collider, out idbase);
            IDMain idmain = (!idbase) ? null : idbase.idMain;
            if (idmain)
            {
                netEntityID = global::NetEntityID.Get(idmain);
                flag        = !netEntityID.isUnassigned;
                takeDamage  = idmain.GetComponent <global::TakeDamage>();
                if (takeDamage && takeDamage.ShouldPlayHitNotification())
                {
                    this.PlayHitNotification(zero, character);
                }
            }
            flag3 = collider.gameObject.CompareTag("Tree Collider");
            if (flag3)
            {
                global::WoodBlockerTemp blockerForPoint = global::WoodBlockerTemp.GetBlockerForPoint(zero);
                if (!blockerForPoint.HasWood())
                {
                    flag3 = false;
                    Rust.Notice.Popup("", "There's no wood left here", 2f);
                }
                else
                {
                    blockerForPoint.ConsumeWood(this.efficiencies[2]);
                }
            }
            this.DoMeleeEffects(eyesRay.origin, zero, Quaternion.LookRotation(up), collider.gameObject);
            if (vm && (takeDamage || flag3))
            {
                vm.CrossFade("pull_out", 0.05f, 0, 1.1f);
            }
        }
        BitStream bitStream = new BitStream(false);

        if (flag)
        {
            bitStream.WriteBoolean(flag);
            bitStream.Write <global::NetEntityID>(netEntityID, new object[0]);
            bitStream.WriteVector3(zero);
        }
        else
        {
            bitStream.WriteBoolean(false);
            bitStream.WriteVector3(zero);
        }
        bitStream.WriteBoolean(flag3);
        itemRep.ActionStream(1, 0, bitStream);
        this.EndSwingWorldAnimations(itemRep);
    }
Пример #4
0
 // Token: 0x0600363C RID: 13884 RVA: 0x000C54BC File Offset: 0x000C36BC
 public virtual void Local_CancelStrikes(global::ViewModel vm, global::ItemRepresentation itemRep, global::IStrikeGunItem itemInstance, ref global::HumanController.InputSample sample)
 {
     vm.CrossFade("idle", 0.15f);
 }