2015-03-12 05:28:33 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal, Ruthberg
|
2016-02-06 21:36:20 +00:00
|
|
|
* Handles wind deflection for projectiles. Called from the unified fired EH only for players on foot and their vehicles if required by settings.
|
2015-01-13 17:05:05 +00:00
|
|
|
*
|
2015-03-12 05:28:33 +00:00
|
|
|
* Arguments:
|
2016-02-06 21:36:20 +00:00
|
|
|
* None. Parameters inherited from EFUNC(common,firedEH)
|
2015-01-13 17:05:05 +00:00
|
|
|
*
|
2015-03-12 05:28:33 +00:00
|
|
|
* Return Value:
|
|
|
|
* Nothing
|
2015-01-13 17:05:05 +00:00
|
|
|
*
|
2015-03-12 05:28:33 +00:00
|
|
|
* Example:
|
2015-04-05 19:08:55 +00:00
|
|
|
* [clientFiredBIS-XEH] call ace_advanced_ballistics_fnc_handleFired
|
2015-03-12 05:28:33 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-13 17:05:05 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-02-06 21:36:20 +00:00
|
|
|
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
|
|
|
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
2015-01-13 17:05:05 +00:00
|
|
|
|
2016-02-07 00:00:42 +00:00
|
|
|
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && (_projectile isKindOf "BulletBase") && (_unit isKindOf "Man")) exitWith {false};
|
2015-04-18 19:17:37 +00:00
|
|
|
|
2016-02-07 00:00:42 +00:00
|
|
|
if (!((_projectile isKindOf "BulletBase") || (_projectile isKindOf "GrenadeBase"))) exitWith {false};
|
2015-04-12 10:33:09 +00:00
|
|
|
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false};
|
2015-01-13 17:05:05 +00:00
|
|
|
|
2016-02-07 00:00:42 +00:00
|
|
|
GVAR(trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
|