diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index d628f012ee..a36f576bd6 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -158,15 +158,17 @@ if (GVAR(AdvancedAirDragEnabled)) then { [{ private ["_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"]; EXPLODE_4_PVT(_this select 0,_bullet,_caliber,_bulletTraceVisible,_index); - - if (!alive _bullet) exitWith { - [_this select 1] call cba_fnc_removePerFrameHandler; - }; - + _bulletVelocity = velocity _bullet; _bulletPosition = getPosASL _bullet; - - if (_bulletTraceVisible && vectorMagnitude _bulletVelocity > 600) then { + + _bulletSpeed = vectorMagnitude _bulletVelocity; + + if (!alive _bullet || _bulletSpeed < 100) exitWith { + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + if (_bulletTraceVisible && _bulletSpeed > 600) then { drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""]; }; diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 9859f330dd..42bac3eac8 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -22,17 +22,17 @@ _bullet = _args select 0; _airFriction = _args select 1; _time = _args select 2; - - if (!alive _bullet) exitwith { - [_this select 1] call cba_fnc_removePerFrameHandler; - }; - - _deltaT = time - _time; - _args set[2, time]; - + _bulletVelocity = velocity _bullet; _bulletSpeed = vectorMagnitude _bulletVelocity; - + + if (!alive _bullet || _bulletSpeed < 100) exitwith { + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + _deltaT = time - _time; + _args set[2, time]; + if (vectorMagnitude ACE_wind > 0) then { _trueVelocity = _bulletVelocity vectorDiff ACE_wind; _trueSpeed = vectorMagnitude _trueVelocity;