/* * Author: Glowbal, Ruthberg * Handles wind deflection for projectiles. * * Arguments: * 0: unit - Object the event handler is assigned to * 1: weapon - Fired weapon * 2: muzzle - Muzzle that was used * 3: mode - Current mode of the fired weapon * 4: ammo - Ammo used * 5: magazine - magazine name which was used * 6: projectile - Object of the projectile that was shot * * Return Value: * Nothing * * Example: * [clientFiredBIS-XEH] call ace_advanced_ballistics_fnc_handleFired * * Public: No */ #include "script_component.hpp" if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false}; private ["_unit", "_bullet"]; _unit = _this select 0; _bullet = _this select 6; if (!hasInterface) exitWith {false}; if (!(_bullet isKindOf "BulletBase")) exitWith {false}; if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; [_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")] call FUNC(updateTrajectoryPFH); true;