private void FixedUpdate() { if (mainChamber.IsSpent && alreadyFired == false) { nadeCup.Fire(); alreadyFired = true; } else if (mainChamber.IsSpent == false && alreadyFired) { alreadyFired = false; } }
private void Fire() { if (!_mIsLatched) { return; } if (!chamber.Fire()) { return; } base.Fire(chamber, GetMuzzle(), true, 1f); FireMuzzleSmoke(); var twoHandStabilized = IsTwoHandStabilized(); var foregripStabilized = AltGrip != null; var shoulderStabilized = IsShoulderStabilized(); if (chamber.GetRound().IsHighPressure&& !isHighPressureTolerant) { Recoil(twoHandStabilized, foregripStabilized, shoulderStabilized, null, 1f); Destroy(); } else if (isHighPressureTolerant) { Recoil(twoHandStabilized, foregripStabilized, shoulderStabilized, null, 1f); } PlayAudioGunShot(chamber.GetRound(), GM.CurrentPlayerBody.GetCurrentSoundEnvironment(), 1f); if (GM.CurrentSceneSettings.IsAmmoInfinite || GM.CurrentPlayerBody.IsInfiniteAmmo) { chamber.IsSpent = false; chamber.UpdateProxyDisplay(); } else if (chamber.GetRound().IsCaseless) { chamber.SetRound(null); } if (deletesCartridgeOnFire) { chamber.SetRound(null); } }