Updated parameterization in Winddeflection module.

This commit is contained in:
Michael Braun 2015-08-04 01:55:09 +02:00
parent 275b0c4300
commit f5a497332a
3 changed files with 7 additions and 11 deletions

View File

@ -21,9 +21,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_bullet"];
_unit = _this select 0;
_bullet = _this select 6;
params ["_unit", "", "", "", "_ammo", "", "_bullet"];
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && (_bullet isKindOf "BulletBase") && (_unit isKindOf "Man")) exitWith {false};
@ -34,6 +32,6 @@ if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exit
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false};
if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false};
GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")];
GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
true;

View File

@ -15,10 +15,7 @@
#include "script_component.hpp"
private ["_logic", "_units", "_activated"];
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {};

View File

@ -18,11 +18,12 @@
[{
// BEGIN_COUNTER(pfeh);
private["_accel", "_accelRef", "_bulletSpeed", "_bulletVelocity", "_deleted", "_deltaT", "_drag", "_dragRef", "_isWind", "_lastTime", "_trueSpeed", "_trueVelocity"];
private["_accel", "_accelRef", "_bulletSpeed", "_bulletVelocity", "_deleted", "_deltaT", "_drag", "_dragRef", "_isWind", "_trueSpeed", "_trueVelocity"];
_lastTime = (_this select 0) select 0;
params ["_args"];
_args params ["_lastTime"];
_deltaT = ACE_time - _lastTime;
(_this select 0) set [0, ACE_time];
_args set [0, ACE_time];
_deleted = 0;
_isWind = (vectorMagnitude ACE_wind > 0);