protected override void Update(WeaponAttackProxy attackProxy, WeaponSideCmd cmd)
        {
            var   config            = attackProxy.WeaponConfigAssy.S_PistolSpreadLogicCfg;
            float spreadScaleFactor = FireSpreadProvider.GetSpreadScaleFactor(config, attackProxy);

            FireSpreadFormula.ApplyPistolFinalSpread(spreadScaleFactor, config.SpreadScale, attackProxy.RuntimeComponent);
        }
Example #2
0
        protected override void Update(WeaponBaseAgent heldBaseAgent, WeaponSideCmd cmd)
        {
            var   config            = heldBaseAgent.PistolSpreadLogicCfg;
            var   weaponRuntime     = heldBaseAgent.RunTimeComponent;
            float spreadScaleFactor = FireSpreadProvider.GetSpreadScaleFactor(config, heldBaseAgent.Owner.WeaponController());

            FireSpreadFormula.ApplyPistolFinalSpread(spreadScaleFactor, config.SpreadScale, weaponRuntime);
        }
Example #3
0
        protected override void Update(WeaponBaseAgent weaponBaseAgent, WeaponSideCmd cmd)

        {
            SniperSpreadLogicConfig config = weaponBaseAgent.SniperSpreadLogicCfg;
            var   runTimeComponent         = weaponBaseAgent.RunTimeComponent;
            float spread = FireSpreadProvider.GetSpreadScaleFactor(config, weaponBaseAgent.Owner.WeaponController());

            FireSpreadFormula.ApplyFixedFinalSpread(spread, config.SpreadScale, runTimeComponent);
        }
        protected override void Update(WeaponAttackProxy attackProxy, WeaponSideCmd cmd)

        {
            // var appearance = controller.RelatedAppearence;
            // var weaponObject = appearance.IsFirstPerson
            //                 ? appearance.GetWeaponP1InHand()
            //                 : appearance.GetWeaponP3InHand();
            // DebugUtil.MyLog(weaponObject.transform.position.ToString("f4"));
            RifleSpreadLogicConfig config = attackProxy.WeaponConfigAssy.S_RifleSpreadLogicCfg;
            float spreadScaleFactor       = FireSpreadProvider.GetSpreadScaleFactor(config, attackProxy);

            FireSpreadFormula.ApplyRifleFinalSpread(spreadScaleFactor, config.SpreadScale, attackProxy.RuntimeComponent);
        }