// Token: 0x06003536 RID: 13622 RVA: 0x000C3AF8 File Offset: 0x000C1CF8
    public virtual void Local_SecondaryFire(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;
        RaycastHit raycastHit;
        bool       flag = Physics.SphereCast(eyesRay, 0.3f, ref raycastHit, this.GetRange(), 406721553);

        if (flag)
        {
            IDBase component = raycastHit.collider.gameObject.GetComponent <IDBase>();
            if (component)
            {
                global::NetEntityID    netEntityID = global::NetEntityID.Get(component);
                global::RepairReceiver local       = component.GetLocal <global::RepairReceiver>();
                if (local != null && netEntityID != global::NetEntityID.unassigned)
                {
                    if (vm)
                    {
                        vm.PlayFireAnimation();
                    }
                    itemInstance.QueueSwingSound(Time.time + this.swingSoundDelay);
                    itemRep.Action <global::NetEntityID>(2, 0, netEntityID);
                }
            }
        }
    }
Exemplo n.º 2
0
 // Token: 0x06003315 RID: 13077 RVA: 0x000C07B4 File Offset: 0x000BE9B4
 public virtual void Local_Reload(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBulletWeaponItem itemInstance, ref global::HumanController.InputSample sample)
 {
     if (vm)
     {
         vm.PlayReloadAnimation();
     }
     this.reloadSound.PlayLocal(itemRep.transform, Vector3.zero, 1f, 0);
     itemRep.Action(3, 0);
 }
 // Token: 0x06003537 RID: 13623 RVA: 0x000C3BBC File Offset: 0x000C1DBC
 public virtual void Local_FireWeapon(global::ViewModel vm, global::ItemRepresentation itemRep, global::IMeleeWeaponItem itemInstance, ref global::HumanController.InputSample sample)
 {
     this.StartSwingWorldAnimations(itemRep);
     if (vm)
     {
         vm.PlayFireAnimation();
     }
     itemInstance.QueueSwingSound(Time.time + this.swingSoundDelay);
     itemInstance.QueueMidSwing(Time.time + this.midSwingDelay);
     if (itemRep.networkViewIsMine)
     {
         itemRep.Action(3, 0);
     }
 }
Exemplo n.º 4
0
    // Token: 0x060036B7 RID: 14007 RVA: 0x000C5B0C File Offset: 0x000C3D0C
    public virtual void DoActualThrow(global::ItemRepresentation itemRep, global::IThrowableItem itemInstance, global::ViewModel vm)
    {
        global::Character component  = global::PlayerClient.GetLocalPlayer().controllable.GetComponent <global::Character>();
        Vector3           eyesOrigin = component.eyesOrigin;
        Vector3           forward    = component.eyesAngles.forward;

        if (vm)
        {
            vm.PlayQueued("deploy");
        }
        int num = 1;

        if (itemInstance.Consume(ref num))
        {
            itemInstance.inventory.RemoveItem(itemInstance.slot);
        }
        BitStream bitStream = new BitStream(false);

        bitStream.WriteVector3(eyesOrigin);
        bitStream.WriteVector3(forward);
        itemRep.Action <BitStream>(1, 0, bitStream);
    }
Exemplo n.º 5
0
 // Token: 0x0600322C RID: 12844 RVA: 0x000BF370 File Offset: 0x000BD570
 public void DoActualIgnite(global::ItemRepresentation itemRep, global::IBasicTorchItem itemInstance, global::ViewModel vm)
 {
     this.Ignite(vm, itemRep, itemInstance);
     itemRep.Action(2, 0);
 }
Exemplo n.º 6
0
 // Token: 0x06003763 RID: 14179 RVA: 0x000C655C File Offset: 0x000C475C
 public void DoActualIgnite(global::ItemRepresentation itemRep, global::IThrowableItem itemInstance, global::ViewModel vm)
 {
     this.Ignite(vm, itemRep, this.GetTorchInstance(itemInstance));
     itemRep.Action(2, 0);
 }