mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
removed excess square brackets
This commit is contained in:
parent
bd23b42863
commit
a817e5e4d2
@ -39,13 +39,13 @@ if (_isTraceBlue) then {
|
|||||||
params ["_projectile", "_handle"];
|
params ["_projectile", "_handle"];
|
||||||
|
|
||||||
if (!alive _projectile) exitWith {
|
if (!alive _projectile) exitWith {
|
||||||
[_handle] call CBA_fnc_removePerFrameHandler;
|
_handle call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _projectileArray = GVAR(dev_trackLines) get (getObjectID _projectile);
|
private _projectileArray = GVAR(dev_trackLines) get (getObjectID _projectile);
|
||||||
|
|
||||||
if (isNil "_projectileArray") exitWith {
|
if (isNil "_projectileArray") exitWith {
|
||||||
[_handle] call CBA_fnc_removePerFrameHandler;
|
_handle call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
(_projectileArray#0) pushBack getPosATL _projectile;
|
(_projectileArray#0) pushBack getPosATL _projectile;
|
||||||
|
@ -35,7 +35,7 @@ if (_csvFormat) then {
|
|||||||
// Gather all configs, either those that could be created from firing or all classes
|
// Gather all configs, either those that could be created from firing or all classes
|
||||||
private _allAmmoConfigs = [];
|
private _allAmmoConfigs = [];
|
||||||
if (_onlyShotAmmoTypes) then {
|
if (_onlyShotAmmoTypes) then {
|
||||||
private _configSearchFunc = {
|
private _configSearchFunction = {
|
||||||
params [
|
params [
|
||||||
["_ammo", "", [""]]
|
["_ammo", "", [""]]
|
||||||
];
|
];
|
||||||
@ -47,13 +47,13 @@ if (_onlyShotAmmoTypes) then {
|
|||||||
private _subMunition = getArray _submunitionConfig;
|
private _subMunition = getArray _submunitionConfig;
|
||||||
for "_i" from 0 to count _subMunition - 1 do {
|
for "_i" from 0 to count _subMunition - 1 do {
|
||||||
if (_i mod 2 == 0) then {
|
if (_i mod 2 == 0) then {
|
||||||
[configName (_cfgAmmoRoot >> (_subMunition#_i))] call _configSearchFunc;
|
configName (_cfgAmmoRoot >> (_subMunition#_i)) call _configSearchFunction;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
private _subMunition = getText _submunitionConfig;
|
private _subMunition = getText _submunitionConfig;
|
||||||
if (_subMunition isNotEqualTo "") then {
|
if (_subMunition isNotEqualTo "") then {
|
||||||
[configName (_cfgAmmoRoot >> _subMunition)] call _configSearchFunc;
|
configName (_cfgAmmoRoot >> _subMunition) call _configSearchFunction;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -61,7 +61,7 @@ if (_onlyShotAmmoTypes) then {
|
|||||||
private _cfgAmmoCfgPath = configFile >> "CfgAmmo";
|
private _cfgAmmoCfgPath = configFile >> "CfgAmmo";
|
||||||
{
|
{
|
||||||
private _magAmmo = getText (_x >> "ammo");
|
private _magAmmo = getText (_x >> "ammo");
|
||||||
[configName (_cfgAmmoCfgPath >> _magAmmo)] call _configSearchFunc;
|
configName (_cfgAmmoCfgPath >> _magAmmo) call _configSearchFunction;
|
||||||
} forEach _allMagazineConfigs;
|
} forEach _allMagazineConfigs;
|
||||||
} else {
|
} else {
|
||||||
_allAmmoConfigs = configProperties [configFile >> "CfgAmmo", "isClass _x && !('ace_frag' in configName _x)", true] apply {configName _x};
|
_allAmmoConfigs = configProperties [configFile >> "CfgAmmo", "isClass _x && !('ace_frag' in configName _x)", true] apply {configName _x};
|
||||||
@ -75,7 +75,7 @@ private _printCount = 0;
|
|||||||
_processedCfgAmmos pushBack _ammo;
|
_processedCfgAmmos pushBack _ammo;
|
||||||
|
|
||||||
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
||||||
private _shouldFrag = [_ammo] call FUNC(shouldFrag);
|
private _shouldFrag = _ammo call FUNC(shouldFrag);
|
||||||
|
|
||||||
if (_shouldFrag || _logAll) then {
|
if (_shouldFrag || _logAll) then {
|
||||||
|
|
||||||
|
@ -31,9 +31,9 @@ diag_log text "//****************** fragCalcDump Beg ******************//";
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _shouldFrag = [_ammo] call FUNC(shouldFrag);
|
private _shouldFrag = _ammo call FUNC(shouldFrag);
|
||||||
if (_shouldFrag || _logAll) then {
|
if (_shouldFrag || _logAll) then {
|
||||||
private _fragInfo = [_ammo] call FUNC(getFragInfo);
|
private _fragInfo = _ammo call FUNC(getFragInfo);
|
||||||
_fragInfo params ["_fragRange", "_fragMaxVelocity", "", "_modifiedFragCount"];
|
_fragInfo params ["_fragRange", "_fragMaxVelocity", "", "_modifiedFragCount"];
|
||||||
private _fragCount = 4 * pi * _modifiedFragCount;
|
private _fragCount = 4 * pi * _modifiedFragCount;
|
||||||
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
||||||
|
@ -45,13 +45,13 @@ GVAR(dev_trackLines) set [getObjectID _object, [[getPosATL _object], _colorArray
|
|||||||
params ["_object", "_handle"];
|
params ["_object", "_handle"];
|
||||||
|
|
||||||
if (!alive _object) exitWith {
|
if (!alive _object) exitWith {
|
||||||
[_handle] call CBA_fnc_removePerFrameHandler;
|
_handle call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _objectArray = GVAR(dev_trackLines) get (getObjectID _object);
|
private _objectArray = GVAR(dev_trackLines) get (getObjectID _object);
|
||||||
|
|
||||||
if (isNil "_objectArray") exitWith {
|
if (isNil "_objectArray") exitWith {
|
||||||
[_handle] call CBA_fnc_removePerFrameHandler;
|
_handle call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
(_objectArray#0) pushBack getPosATL _object;
|
(_objectArray#0) pushBack getPosATL _object;
|
||||||
|
@ -38,7 +38,7 @@ TRACE_3("willFrag",_timeSinceLastFrag,CBA_missionTime,_maxFragCount);
|
|||||||
_shotParentVehicle setVariable [QGVAR(obj_nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF_VEHICLE];
|
_shotParentVehicle setVariable [QGVAR(obj_nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF_VEHICLE];
|
||||||
private _maxFragCount = round linearConversion [ACE_FRAG_COUNT_MIN_TIME, ACE_FRAG_COUNT_MAX_TIME, _timeSinceLastFrag, ACE_FRAG_COUNT_MIN, ACE_FRAG_COUNT_MAX, true];
|
private _maxFragCount = round linearConversion [ACE_FRAG_COUNT_MIN_TIME, ACE_FRAG_COUNT_MAX_TIME, _timeSinceLastFrag, ACE_FRAG_COUNT_MIN, ACE_FRAG_COUNT_MAX, true];
|
||||||
|
|
||||||
[_ammo] call FUNC(getFragInfo) params ["_fragRange", "_fragVel", "_fragTypes", "_modFragCount"];
|
_ammo call FUNC(getFragInfo) params ["_fragRange", "_fragVel", "_fragTypes", "_modFragCount"];
|
||||||
// For low frag rounds limit the # of frags created
|
// For low frag rounds limit the # of frags created
|
||||||
if (_modFragCount < ACE_FRAG_LOW_FRAG_MOD_COUNT) then {
|
if (_modFragCount < ACE_FRAG_LOW_FRAG_MOD_COUNT) then {
|
||||||
_maxFragCount = _modFragCount * ACE_FRAG_LOW_FRAG_COEFF;
|
_maxFragCount = _modFragCount * ACE_FRAG_LOW_FRAG_COEFF;
|
||||||
|
@ -29,7 +29,7 @@ if (_ammo == "" || {_objectHit isKindOf "CAManBase"}) exitWith {
|
|||||||
TRACE_4("invalid round or hit",CBA_missionTime,GVAR(nextSpallAllowTime),_objectHit,_lastPosASL);
|
TRACE_4("invalid round or hit",CBA_missionTime,GVAR(nextSpallAllowTime),_objectHit,_lastPosASL);
|
||||||
};
|
};
|
||||||
|
|
||||||
private _material = [_surfaceType] call FUNC(getMaterialInfo);
|
private _material = _surfaceType call FUNC(getMaterialInfo);
|
||||||
if (_material == "ground") exitWith {
|
if (_material == "ground") exitWith {
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
systemChat "ground spall";
|
systemChat "ground spall";
|
||||||
@ -37,7 +37,7 @@ if (_material == "ground") exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Find spall speed / fragment info
|
// Find spall speed / fragment info
|
||||||
[_ammo] call FUNC(getSpallInfo) params ["_caliber", "_explosive", "_indirectHit"];
|
_ammo call FUNC(getSpallInfo) params ["_caliber", "_explosive", "_indirectHit"];
|
||||||
private _vel = if (alive _projectile) then {
|
private _vel = if (alive _projectile) then {
|
||||||
_explosive = 0; // didn't explode since it's alive a frame later
|
_explosive = 0; // didn't explode since it's alive a frame later
|
||||||
velocity _projectile
|
velocity _projectile
|
||||||
@ -132,8 +132,8 @@ systemChat ("spd: " + str speed _spallSpawner + ", spawner: " + _fragSpawnType +
|
|||||||
_spallSpawner addEventHandler [
|
_spallSpawner addEventHandler [
|
||||||
"SubmunitionCreated",
|
"SubmunitionCreated",
|
||||||
{
|
{
|
||||||
params ["", "_subProj"];
|
params ["", "_submunitionProjectile"];
|
||||||
[_subProj] call FUNC(dev_addRound);
|
_submunitionProjectile call FUNC(dev_addRound);
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user