Added new PFH abort condition (velocity < 100 m/s)

This commit is contained in:
ulteq 2015-04-16 17:30:50 +02:00
parent 55d9f7a3da
commit defe46b769
2 changed files with 18 additions and 16 deletions

View File

@ -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,"","",""];
};

View File

@ -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;