Added a new module option for wind deflection:

*enabled - true/false
This commit is contained in:
ulteq 2015-04-18 11:10:05 +02:00
parent 4264f78128
commit 9057edb1e2
3 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,10 @@
class ACE_Settings {
class GVAR(enabled) {
displayName = "Wind Deflection";
description = "Enables wind deflection";
typeName = "BOOL";
value = 1;
};
class GVAR(simulationInterval) {
displayName = "Simulation Interval";
description = "Defines the interval between every calculation step";

View File

@ -11,6 +11,12 @@ class CfgVehicles {
isTriggerActivated = 0;
author = "$STR_ACE_Common_ACETeam";
class Arguments {
class enabled {
displayName = "Wind Deflection";
description = "Enables wind deflection";
typeName = "BOOL";
defaultValue = 1;
};
class simulationInterval {
displayName = "Simulation Interval";
description = "Defines the interval between every calculation step";

View File

@ -28,6 +28,7 @@ _unit = _this select 0;
_bullet = _this select 6;
if (!hasInterface) exitWith {false};
if (!(GVAR(enabled))) 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};