// Token: 0x060039D2 RID: 14802 RVA: 0x000CB974 File Offset: 0x000C9B74 public override void SecondaryAttack(ref global::HumanController.InputSample sample) { float num = Time.time + this.datablock.fireRate; base.nextPrimaryAttackTime = num; base.nextSecondaryAttackTime = num; }
// Token: 0x060039FD RID: 14845 RVA: 0x000CC68C File Offset: 0x000CA88C public override void SecondaryAttack(ref global::HumanController.InputSample sample) { base.nextSecondaryAttackTime = Time.time + this.datablock.fireRateSecondary; T datablock = this.datablock; datablock.SecondaryAttack(base.viewModelInstance, base.itemRepresentation, this.iface as global::IThrowableItem, ref sample); }
// Token: 0x06003909 RID: 14601 RVA: 0x000C9F3C File Offset: 0x000C813C public override void Reload(ref global::HumanController.InputSample sample) { T datablock = this.datablock; datablock.Local_Reload(base.viewModelInstance, base.itemRepresentation, this.iface as global::IBulletWeaponItem, ref sample); this.ActualReload(); base.inventory.Refresh(); }
// Token: 0x06003847 RID: 14407 RVA: 0x000C7C48 File Offset: 0x000C5E48 public void InvokeInputItemPostFrame(object item, ref global::HumanController.InputSample sample) { global::IHeldItem heldItem = item as global::IHeldItem; if (heldItem != null) { heldItem.ItemPostFrame(ref sample); } }
// Token: 0x06003A00 RID: 14848 RVA: 0x000CC70C File Offset: 0x000CA90C public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (this.holdingBack && !sample.attack && Time.time - this.holdingStartTime > this.minReleaseTime) { T datablock = this.datablock; datablock.AttackReleased(base.viewModelInstance, base.itemRepresentation, this.iface as global::IThrowableItem, ref sample); this.holdingBack = false; } }
// Token: 0x0600394B RID: 14667 RVA: 0x000CAAE0 File Offset: 0x000C8CE0 public virtual void ItemPreFrame(ref global::HumanController.InputSample sample) { if (sample.attack2 && this.datablock.secondaryFireAims && this.CanAim()) { sample.attack2 = false; sample.aim = true; sample.yaw *= this.datablock.aimSensitivtyPercent; sample.pitch *= this.datablock.aimSensitivtyPercent; } }
// Token: 0x06003846 RID: 14406 RVA: 0x000C7C20 File Offset: 0x000C5E20 public object InvokeInputItemPreFrame(ref global::HumanController.InputSample sample) { global::IHeldItem heldItem = this.inputItem as global::IHeldItem; if (heldItem != null) { heldItem.ItemPreFrame(ref sample); } return(heldItem); }
// Token: 0x060039E1 RID: 14817 RVA: 0x000CBD38 File Offset: 0x000C9F38 public virtual void CancelAttack(ref global::HumanController.InputSample sample) { if (this.beganFiring) { global::ViewModel viewModelInstance = base.viewModelInstance; T datablock = this.datablock; datablock.Local_CancelStrikes(base.viewModelInstance, base.itemRepresentation, this.iface as global::IStrikeGunItem, ref sample); base.nextPrimaryAttackTime = Time.time + 1f; this.ResetFiring(); } }
// Token: 0x060039E2 RID: 14818 RVA: 0x000CBD9C File Offset: 0x000C9F9C public override void PrimaryAttack(ref global::HumanController.InputSample sample) { if (!this.beganFiring) { int num = Random.Range(1, this.datablock.strikeDurations.Length + 1); num = Mathf.Clamp(num, 1, this.datablock.strikeDurations.Length); this.actualFireTime = Time.time + this.datablock.strikeDurations[num - 1]; T datablock = this.datablock; datablock.Local_BeginStrikes(num, base.viewModelInstance, base.itemRepresentation, this.iface as global::IStrikeGunItem, ref sample); this.beganFiring = true; } }
// Token: 0x06003910 RID: 14608 RVA: 0x000CA1E4 File Offset: 0x000C83E4 public override void PrimaryAttack(ref global::HumanController.InputSample sample) { base.nextPrimaryAttackTime = Time.time + this.datablock.fireRate; if (this.datablock.NoAimingAfterShot) { this.nextAimTime = Time.time + this.datablock.fireRate; } global::ViewModel vm = base.viewModelInstance; if (global::actor.forceThirdPerson) { vm = null; } T datablock = this.datablock; datablock.Local_FireWeapon(vm, base.itemRepresentation, this.iface as global::IBulletWeaponItem, ref sample); }
// Token: 0x060039D5 RID: 14805 RVA: 0x000CB9C0 File Offset: 0x000C9BC0 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (this.queuedSwingAttackTime > 0f && this.queuedSwingAttackTime < Time.time) { T datablock = this.datablock; datablock.Local_MidSwing(base.viewModelInstance, base.itemRepresentation, this.iface as global::IMeleeWeaponItem, ref sample); this.queuedSwingAttackTime = -1f; } if (this.queuedSwingSoundTime > 0f && this.queuedSwingSoundTime < Time.time) { T datablock2 = this.datablock; datablock2.SwingSound(); this.queuedSwingSoundTime = -1f; } }
// Token: 0x060038B6 RID: 14518 RVA: 0x000C9578 File Offset: 0x000C7778 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (sample.attack && this.CanBandage()) { this.Primary(ref sample); } else { if (this.lastFramePrimary) { this.CancelBandage(); } this.lastFramePrimary = false; } }
// Token: 0x06003917 RID: 14615 RVA: 0x000CA6A8 File Offset: 0x000C88A8 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (!this._aimHelper) { return; } if (sample.attack && this.CanPlace()) { global::Character character = base.inventory.idMain as global::Character; if (character && !character.stateFlags.grounded) { return; } this.DoPlace(); } }
// Token: 0x060039D1 RID: 14801 RVA: 0x000CB8D4 File Offset: 0x000C9AD4 public override void PrimaryAttack(ref global::HumanController.InputSample sample) { float num = this.datablock.fireRate; global::Metabolism local = base.inventory.GetLocal <global::Metabolism>(); if (local && local.GetCalorieLevel() <= 0f) { num = this.datablock.fireRate * 2f; } float num2 = Time.time + num; base.nextSecondaryAttackTime = num2; base.nextPrimaryAttackTime = num2; T datablock = this.datablock; datablock.Local_FireWeapon(base.viewModelInstance, base.itemRepresentation, this.iface as global::IMeleeWeaponItem, ref sample); }
// Token: 0x0600390E RID: 14606 RVA: 0x000CA080 File Offset: 0x000C8280 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { if (sample.attack && this.clipAmmo == 0 && base.nextPrimaryAttackTime <= Time.time) { T datablock = this.datablock; datablock.Local_DryFire(base.viewModelInstance, base.itemRepresentation); base.nextPrimaryAttackTime = Time.time + 1f; sample.attack = false; } base.ItemPreFrame(ref sample); if (sample.aim && this.datablock.aimSway > 0f) { float num = Time.time * this.datablock.aimSwaySpeed; float num2 = this.datablock.aimSway * ((!sample.crouch) ? 0f : 0f); sample.yaw += (Mathf.PerlinNoise(num, num) - 0.5f) * num2 * Time.deltaTime; sample.pitch += (Mathf.PerlinNoise(num + 0.1f, num + 0.2f) - 0.5f) * num2 * Time.deltaTime; } }
// Token: 0x060039E0 RID: 14816 RVA: 0x000CBCA4 File Offset: 0x000C9EA4 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (!sample.attack && this.beganFiring) { this.CancelAttack(ref sample); sample.attack = false; } if (sample.attack && base.clipAmmo == 0 && this.canReload) { this.Reload(ref sample); } if (this.beganFiring && sample.attack && Time.time > this.actualFireTime) { base.PrimaryAttack(ref sample); this.ResetFiring(); } }
// Token: 0x06003A45 RID: 14917 RVA: 0x000CCBA0 File Offset: 0x000CADA0 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (sample.is_sprinting) { float num = Time.time + 0.1f; this.nextPrimaryAttackTime = ((this.nextPrimaryAttackTime <= num) ? num : this.nextPrimaryAttackTime); this.wasSprinting = true; } else if (this.wasSprinting) { float num2 = Time.time + 0.3f; this.nextPrimaryAttackTime = ((this.nextPrimaryAttackTime <= num2) ? num2 : this.nextPrimaryAttackTime); this.wasSprinting = false; } if (this.datablock.isSemiAuto) { if (sample.attack && this.lastFrameAttack) { sample.attack = false; } else if (!sample.attack && this.lastFrameAttack) { this.lastFrameAttack = false; } else if (sample.attack && !this.lastFrameAttack) { this.lastFrameAttack = true; } } if (sample.attack && this.canPrimaryAttack) { this.PrimaryAttack(ref sample); } if (sample.attack2 && this.canSecondaryAttack) { this.SecondaryAttack(ref sample); } if (sample.reload && this.canReload) { this.Reload(ref sample); } }
// Token: 0x060039E8 RID: 14824 RVA: 0x000CC450 File Offset: 0x000CA650 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); try { if (sample.attack2 && !this.lastFrameAttack2) { this.desiredRotation *= Quaternion.AngleAxis(90f, Vector3.up); } if (sample.attack && this.CanPlace()) { this.DoPlace(); } this.lastFrameAttack2 = sample.attack2; } catch (Exception e) { this.InformException(e, "in ItemPreFrame", ref global::StructureComponentItem <T> .informedPreFrame, null); } }
// Token: 0x06003A2A RID: 14890 RVA: 0x000CC9F8 File Offset: 0x000CABF8 public override void ItemPreFrame(ref global::HumanController.InputSample sample) { base.ItemPreFrame(ref sample); if (this.realThrowTime != 0f && Time.time >= this.realThrowTime) { T datablock = this.datablock; datablock.DoActualThrow(base.itemRepresentation, this.iface as global::ITorchItem, base.viewModelInstance); this.realThrowTime = 0f; } if (this.realIgniteTime != 0f && Time.time >= this.realIgniteTime) { T datablock2 = this.datablock; datablock2.DoActualIgnite(base.itemRepresentation, this.iface as global::ITorchItem, base.viewModelInstance); this.realIgniteTime = 0f; } if (this.forceSecondaryTime != 0f && Time.time >= this.forceSecondaryTime) { this.SecondaryAttack(ref sample); this.forceSecondaryTime = 0f; } }
// Token: 0x060038B8 RID: 14520 RVA: 0x000C9630 File Offset: 0x000C7830 public virtual void Primary(ref global::HumanController.InputSample sample) { this.lastFramePrimary = true; sample.crouch = true; sample.walk = 0f; sample.strafe = 0f; sample.jump = false; sample.sprint = false; if (this.bandageStartTime == -1f) { this.StartBandage(); } float num = Time.time - this.bandageStartTime; float num2 = Mathf.Clamp(num / this.datablock.bandageDuration, 0f, 1f); string label = string.Empty; T datablock = this.datablock; bool flag = datablock.DoesGiveBlood(); T datablock2 = this.datablock; bool flag2 = datablock2.DoesBandage(); if (flag2 && !flag) { label = "Bandaging..."; } else if (flag2 && flag) { label = "Bandage + Transfusion..."; } else if (!flag2 && flag) { label = "Transfusing..."; } global::RPOS.SetActionProgress(true, label, num2); if (num2 >= 1f) { this.FinishBandage(); } }
// 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: 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); } }
// 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); } } } }
// Token: 0x060003F0 RID: 1008 RVA: 0x00012AD8 File Offset: 0x00010CD8 private void ProcessInput(ref global::HumanController.InputSample sample) { global::CCMotor ccmotor = base.ccmotor; bool flag; bool flag2; if (ccmotor) { flag = ccmotor.isGrounded; flag2 = ccmotor.isSliding; if (!flag && !flag2) { sample.sprint = false; sample.crouch = false; sample.aim = false; sample.info__crouchBlocked = false; if (!this.wasInAir) { this.wasInAir = true; this.magnitudeAir = ccmotor.input.moveDirection.magnitude; this.midairStartPos = base.transform.position; } this.lastFrameVelocity = ccmotor.velocity; } else if (this.wasInAir) { this.wasInAir = false; this.magnitudeAir = 1f; this.landingSpeedPenaltyTime = 0f; if (base.transform.position.y < this.midairStartPos.y && Mathf.Abs(base.transform.position.y - this.midairStartPos.y) > 2f) { base.idMain.GetLocal <global::FallDamage>().SendFallImpact(this.lastFrameVelocity); } this.lastFrameVelocity = Vector3.zero; this.midairStartPos = Vector3.zero; } bool flag3 = sample.crouch || sample.info__crouchBlocked; global::CCMotor.InputFrame input; input.jump = sample.jump; input.moveDirection.x = sample.strafe; input.moveDirection.y = 0f; input.moveDirection.z = sample.walk; input.crouchSpeed = ((!sample.crouch) ? 1f : -1f); if (input.moveDirection != Vector3.zero) { float num = input.moveDirection.magnitude; if (num < 1f) { input.moveDirection /= num; num *= num; input.moveDirection *= num; } else if (num > 1f) { input.moveDirection /= num; } if (global::HumanController.InputSample.MovementScale < 1f) { if (global::HumanController.InputSample.MovementScale > 0f) { input.moveDirection *= global::HumanController.InputSample.MovementScale; } else { input.moveDirection = Vector3.zero; } } Vector3 moveDirection = input.moveDirection; moveDirection.x *= this.controlConfig.sprintScaleX; moveDirection.z *= this.controlConfig.sprintScaleY; float advance; if (sample.sprint && !flag3 && !sample.aim) { advance = Time.deltaTime * this.sprintInMulTime; } else { sample.sprint = false; advance = -Time.deltaTime; } input.moveDirection += moveDirection * this.controlConfig.curveSprintAddSpeedByTime.EvaluateClampedTime(ref this.sprintTime, advance); float advance2; if (flag3) { advance2 = Time.deltaTime * this.crouchInMulTime; } else { advance2 = -Time.deltaTime; } input.moveDirection *= this.controlConfig.curveCrouchMulSpeedByTime.EvaluateClampedTime(ref this.crouchTime, advance2); input.moveDirection = base.transform.TransformDirection(input.moveDirection); if (this.wasInAir) { float magnitude = input.moveDirection.magnitude; if (!Mathf.Approximately(magnitude, this.magnitudeAir)) { input.moveDirection /= magnitude; input.moveDirection *= this.magnitudeAir; } } else { input.moveDirection *= this.controlConfig.curveLandingSpeedPenalty.EvaluateClampedTime(ref this.landingSpeedPenaltyTime, Time.deltaTime); } } else { this.sprinting = false; this.exitingSprint = false; this.sprintTime = 0f; this.crouchTime = ((!sample.crouch) ? 0f : this.controlConfig.curveCrouchMulSpeedByTime.GetEndTime()); this.magnitudeAir = 1f; } if (global::DebugInput.GetKey(104)) { input.moveDirection *= 100f; } ccmotor.input = input; if (ccmotor.stepMode == global::CCMotor.StepMode.Elsewhere) { ccmotor.Step(); } } else { flag2 = false; flag = true; } global::Character idMain = base.idMain; global::Crouchable crouchable = idMain.crouchable; if (idMain) { global::Angle2 eyesAngles = base.eyesAngles; eyesAngles.yaw = Mathf.DeltaAngle(0f, base.eyesAngles.yaw + sample.yaw); eyesAngles.pitch = base.ClampPitch(eyesAngles.pitch + sample.pitch); base.eyesAngles = eyesAngles; ushort flags = idMain.stateFlags.flags; if (crouchable) { this.crouch_smoothing.AddSeconds((double)Time.deltaTime); crouchable.LocalPlayerUpdateCrouchState(ccmotor, ref sample.crouch, ref sample.info__crouchBlocked, ref this.crouch_smoothing); } int num2 = ((!sample.aim) ? 0 : 4) | ((!sample.sprint) ? 0 : 2) | ((!sample.attack) ? 0 : 8) | ((!sample.attack2) ? 0 : 256) | ((!sample.crouch) ? 0 : 1) | ((sample.strafe == 0f && sample.walk == 0f) ? 0 : 64) | ((!LockCursorManager.IsLocked()) ? 128 : 0) | ((!flag) ? 16 : 0) | ((!flag2) ? 0 : 32) | ((!this.bleeding) ? 0 : 512) | ((!sample.lamp) ? 0 : 2048) | ((!sample.laser) ? 0 : 4096) | ((!sample.info__crouchBlocked) ? 0 : 1024); idMain.stateFlags = num2; if ((int)flags != num2) { idMain.Signal_State_FlagsChanged(false); } } this.crouch_was_blocked = sample.info__crouchBlocked; if (sample.inventory) { global::RPOS.Toggle(); } if (Input.GetKeyDown(27)) { global::RPOS.Hide(); } }
// Token: 0x060003EF RID: 1007 RVA: 0x00012948 File Offset: 0x00010B48 protected void UpdateInput() { global::InventoryHolder inventoryHolder = this.inventoryHolder; global::PlayerClient.InputFunction(base.gameObject); bool noLamp; bool noLaser; if (inventoryHolder) { global::ItemModFlags modFlags = inventoryHolder.modFlags; noLamp = ((modFlags & global::ItemModFlags.Lamp) == global::ItemModFlags.Other); noLaser = ((modFlags & global::ItemModFlags.Laser) == global::ItemModFlags.Other); } else { noLaser = (noLamp = true); } global::HumanController.InputSample inputSample = global::HumanController.InputSample.Poll(noLamp, noLaser); inputSample.info__crouchBlocked = this.crouch_was_blocked; bool flag = base.GetLocal <global::FallDamage>().GetLegInjury() > 0f; if (flag) { inputSample.crouch = true; inputSample.jump = false; } if (inputSample.walk <= 0f || Mathf.Abs(inputSample.strafe) >= 0.05f || inputSample.attack2 || this._inventory.isCrafting || flag) { inputSample.sprint = false; } float num = 1f; if (this._inventory.isCrafting) { num *= 0.5f; } if (flag) { num *= 0.5f; } global::HumanController.InputSample.MovementScale = num; if (inventoryHolder) { object item = inventoryHolder.InvokeInputItemPreFrame(ref inputSample); this.ProcessInput(ref inputSample); inventoryHolder.InvokeInputItemPostFrame(item, ref inputSample); } else { this.ProcessInput(ref inputSample); } this.CheckBeltUsage(); if (this.wasSprinting && !inputSample.sprint) { this.SprintingStopped(); } else if (!this.wasSprinting && inputSample.sprint) { this.SprintingStarted(); } }
// Token: 0x060035F9 RID: 13817 RVA: 0x000C4EDC File Offset: 0x000C30DC public override void Local_FireWeapon(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBulletWeaponItem itemInstance, ref global::HumanController.InputSample sample) { global::Character character = itemInstance.character; if (character == null) { return; } if (itemInstance.clipAmmo <= 0) { return; } Ray eyesRay = character.eyesRay; int num = 1; itemInstance.Consume(ref num); BitStream bitStream = new BitStream(false); float bulletRange = this.GetBulletRange(itemRep); for (int i = 0; i < this.numPellets; i++) { Ray ray = eyesRay; ray.direction = Quaternion.LookRotation(eyesRay.direction) * Quaternion.Euler(Random.Range(-this.xSpread, this.xSpread), Random.Range(-this.ySpread, this.ySpread), 0f) * Vector3.forward; Component component = null; bool allowBlood; this.FireSingleBullet(bitStream, ray, itemRep, out component, out allowBlood); this.MakeTracer(ray.origin, ray.origin + ray.direction * bulletRange, bulletRange, component, allowBlood); } itemRep.ActionStream(1, 0, bitStream); bool flag = vm; global::Socket muzzle; if (flag) { muzzle = vm.muzzle; } else { muzzle = itemRep.muzzle; } this.DoWeaponEffects(character.transform, muzzle, flag, itemRep); if (flag) { vm.PlayFireAnimation(); } float num2 = 1f; if (sample.aim) { num2 -= this.aimingRecoilSubtract; } else if (sample.crouch) { num2 -= this.crouchRecoilSubtract; } float pitch = Random.Range(this.recoilPitchMin, this.recoilPitchMax) * num2; float yaw = Random.Range(this.recoilYawMin, this.recoilYawMax) * num2; global::RecoilSimulation recoilSimulation = character.recoilSimulation; if (recoilSimulation) { recoilSimulation.AddRecoil(this.recoilDuration, pitch, yaw); } global::HeadBob component2 = global::CameraMount.current.GetComponent <global::HeadBob>(); if (component2 && this.shotBob) { component2.AddEffect(this.shotBob); } }
// 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: 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); }
// Token: 0x060032BD RID: 12989 RVA: 0x000C00F0 File Offset: 0x000BE2F0 public virtual void Local_FireArrow(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBowWeaponItem itemInstance, ref global::HumanController.InputSample sample) { if (vm) { vm.Play("fire_1", 0); } this.MakeReadyIn(itemInstance, this.fireRate); global::Character character = itemInstance.character; if (character == null) { return; } Ray eyesRay = character.eyesRay; Vector3 eyesOrigin = character.eyesOrigin; this.FireArrow(eyesOrigin, character.eyesRotation, itemRep, itemInstance); BitStream bitStream = new BitStream(false); bitStream.WriteVector3(eyesOrigin); bitStream.WriteQuaternion(character.eyesRotation); itemRep.ActionStream(1, 0, bitStream); }
// Token: 0x060032BC RID: 12988 RVA: 0x000C0088 File Offset: 0x000BE288 public virtual void Local_ReadyArrow(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBowWeaponItem itemInstance, ref global::HumanController.InputSample sample) { if (vm) { vm.Play("drawarrow", 0); } itemInstance.completeDrawTime = Time.time + this.drawLength; this.drawArrowSound.PlayLocal(Camera.main.transform, Vector3.zero, 1f, 1f, 3f, 20f, 0); }